コード例 #1
0
 function it_lets_you_put_another_logger(LoggerInterface $newLogger, ErrorController $errorController, SlimAppAdapter $slimAppAdapter, ResponseInterface $response)
 {
     // ARRANGE
     $slimAppAdapter->run(null, $newLogger, $errorController)->willReturn($response);
     // ACT
     $this->setLogger($newLogger);
     $this->run();
     // ASSERT
     $slimAppAdapter->run(null, $newLogger, $errorController)->shouldHaveBeenCalled();
 }
コード例 #2
0
 private function applyRouteToSlimApplication(SlimAppAdapter $slimAppAdapter, Route $route, \Closure $controllerClosure)
 {
     $slimAppAdapter->addRoute($route, $controllerClosure);
 }
コード例 #3
0
 public function run(ServerRequestInterface $testingRequest = null) : ResponseInterface
 {
     return $this->slimAppAdapter->run($testingRequest, $this->logger, $this->errorController);
 }