prophesize('WellRESTed\Routing\MethodMapInterface'); $route = new StaticRoute("/", $methodMap->reveal()); $this->assertSame(RouteInterface::TYPE_STATIC, $route->getType()); } /** * @covers ::matchesRequestTarget */ public function testMatchesExactRequestTarget() { $methodMap = $this->prophesize('WellRESTed\Routing\MethodMapInterface'); $route = new StaticRoute("/", $methodMap->reveal()); $this->assertTrue($route->matchesRequestTarget("/")); } /** * @covers ::getPathVariables */ public function testReturnsEmptyArrayForPathVariables() { $methodMap = $this->prophesize('WellRESTed\Routing\MethodMapInterface'); $route = new StaticRoute("/", $methodMap->reveal()); $this->assertSame([], $route->getPathVariables()); } /** * @covers ::matchesRequestTarget */ public function testDoesNotMatchNonmatchingRequestTarget() { $methodMap = $this->prophesize('WellRESTed\Routing\MethodMapInterface'); $route = new StaticRoute("/", $methodMap->reveal()); $this->assertFalse($route->matchesRequestTarget("/cats/")); } }