Example #1
0
 public function testValidRequest()
 {
     $app = new Application();
     $app->attach(new ValidControllerFixture());
     $browser = new Browser($app);
     $resp = $browser->get("/");
     $this->assertEquals(200, $resp->getStatusCode());
 }
Example #2
0
 /**
  * @expectedException \Micro\Exceptions\BadHandlerReturnException
  */
 public function testNotFoundCalledOnBadRequest()
 {
     $notFound = $this->prophet->prophesize("Micro\\NotFoundControllerInterface");
     $app = new Application();
     $app->debugMode = true;
     $app->attach($notFound->reveal());
     $req = Request::create("/");
     $app->run($req);
 }