/** * {@inheritdoc} */ public function getInstance(array $methods, Resource $resource, callable $handler) : Route { $resource->withPrefix($this->prefix); return new Route($methods, $resource, $handler); }
public function testWithPrefixDoesNotAddRootPrefix() { $given = $expected = '/hello/world'; $instance = new Resource($given); $instance->withPrefix('/'); $this->assertAttributeEquals($expected, 'path', $instance); }