コード例 #1
0
ファイル: AppTest.php プロジェクト: netom/bulletphp
 public function testHelperIsRequestPathReturnsFalseWhenPathIsNotCurrent()
 {
     $actual = array();
     $app = new Bullet\App();
     $app->path('foo', function ($request) use($app, &$actual) {
         // Should be 'false' - "foo" is not the full requested path, "foo/bar" is
         $actual[] = var_export($app->isRequestPath(), true);
         $app->path('bar', function ($request) use($app) {
             return 'anything at all';
         });
     });
     $app->run(new Bullet\Request('GET', 'foo/bar'));
     $this->assertEquals(array('false'), $actual);
 }