16 use PHPUnit\Framework\TestCase;
17 use Psr\Http\Message\ServerRequestInterface;
26 $requestMock = $this->createMock(ServerRequestInterface::class);
27 $requestMock->method(
'getAttribute')
28 ->with(ApiVersion::ATTRIBUTE_NAME, ApiVersion::V1)
29 ->willReturn(ApiVersion::V2);
39 $requestMock = $this->createMock(ServerRequestInterface::class);
40 $requestMock->method(
'getAttribute')
41 ->with(ApiVersion::ATTRIBUTE_NAME, ApiVersion::V1)
42 ->willReturn(ApiVersion::V1);
static getVersion(ServerRequestInterface $request)
testGetVersionReturnsDefaultVersion()
testGetVersionReturnsSetVersion()