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()); }
public function testShouldRemovePrefixFromUrlLocation() { self::assertEquals('/bar', $this->section->trimSectionLocation('foo/bar')); self::assertEquals('bar', $this->section->trimSectionLocation('foobar')); }