Exemplo n.º 1
0
 public function testGetForShouldCheckChildSectionsFirst()
 {
     $this->section->section('/bar')->get('', 'index', 'index')->end()->get('/bar', 'index', 'another');
     self::assertInstanceOf('\\Nano\\Route\\StaticLocation', $this->section->getFor('get', 'foo/bar'));
     self::assertEquals('index', $this->section->getFor('get', 'foo/bar')->action());
 }
Exemplo n.º 2
0
 public function testShouldRemovePrefixFromUrlLocation()
 {
     self::assertEquals('/bar', $this->section->trimSectionLocation('foo/bar'));
     self::assertEquals('bar', $this->section->trimSectionLocation('foobar'));
 }