public function testRouteMatchWithDeepPrefix() { Apricot::reset(); Apricot::setEnvironment('test'); Apricot::prefix('/foo', function () { Apricot::when('/', function () { echo "Foo!"; }); Apricot::prefix('/bar', function () { Apricot::when('/', function () { echo "Bar!"; }); Apricot::when('/baz', function () { echo "Baz!"; }); }); }); $this->assertTrue('Foo!' === Apricot::browse('/foo')); $this->assertTrue('Bar!' === Apricot::browse('/foo/bar')); $this->assertTrue('Baz!' === Apricot::browse('/foo/bar/baz')); }