Esempio n. 1
0
 /**
  *
  */
 function test_invoke()
 {
     $app = new App();
     $request = new Request();
     $response = new Response();
     $web = new Context($app);
     $next = function (Request $request, Response $response) {
         return $response;
     };
     $this->assertEquals($response, $web($request, $response, $next));
     $this->assertEquals($app, _Context::service());
 }
Esempio n. 2
0
 /**
  *
  */
 function test_service_does_not_exist()
 {
     $this->setExpectedException(\RuntimeException::class, 'Service does not exist');
     Context::service();
 }