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