Ejemplo n.º 1
0
 public function testUrlHelperReturnsGivenPath()
 {
     $app = new Bullet\App();
     $app->path('test', function ($request) use($app) {
         $collect[] = 'test';
         $app->path('foo', function () use($app) {
             return $app->url('blog/42/edit');
         });
         $app->path('foo2', function () {
             $collect[] = 'foo2';
         });
     });
     $response = $app->run(new Bullet\Request('GET', '/test/foo/'));
     $this->assertEquals(200, $response->status());
     $this->assertEquals('cli:/blog/42/edit', $response->content());
 }