securityException = new SecurityException(); } /** * Test the getType() function. */ public function testGetType(): void { $this->assertSame( 'secure', $this->securityException->getType(), '::getType should always return the type of `secure`.' ); } /** * Test the setMessage() function. */ public function testSetMessage(): void { $sampleMessage = 'foo'; $this->securityException->setMessage($sampleMessage); $this->assertSame( $sampleMessage, $this->securityException->getMessage(), '::getMessage should always return the message set.' ); } /** * Test the setReason() and corresponding getReason() function. */ public function testSetGetReason(): void { $sampleReason = 'canary'; $this->securityException->setReason($sampleReason); $this->assertSame( $sampleReason, $this->securityException->getReason(), '::getReason should always return the reason set.' ); } }