* @link https://www.oxidmodule.com */ declare(strict_types=1); namespace D3\KlicktippPhpClient\tests\unit\Exceptions; use D3\KlicktippPhpClient\Exceptions\CommunicationException; use D3\KlicktippPhpClient\Exceptions\MissingEndpointException; use D3\KlicktippPhpClient\tests\TestCase; use ReflectionException; /** * @covers \D3\KlicktippPhpClient\Exceptions\MissingEndpointException */ class MissingEndpointExceptionTest extends TestCase { /** * @test * @return void * @throws ReflectionException * @covers \D3\KlicktippPhpClient\Exceptions\MissingEndpointException::__construct */ public function testConstructor(): void { /** @var MissingEndpointException $sutMock */ $sutMock = $this->getMockBuilder(MissingEndpointException::class) ->disableOriginalConstructor() ->getMock(); $this->callMethod( $sutMock, '__construct', ['myMessage', []] ); $this->assertMatchesRegularExpression( '/.*?endpoint.*?missing.*/i', $sutMock->getMessage() ); } }