Ejemplo n.º 1
0
 /**
  * @expectedException Modus\ErrorLogging\Exception\LoggerNotRegistered
  * @expectedMessage 'not registered'
  */
 public function testUnregisteredLoggerThrowsException()
 {
     $runner = Mockery::mock('League\\BooBoo\\Runner');
     $accept = Mockery::mock('Aura\\Accept\\Accept');
     $manager = new Manager($runner, $accept, []);
     $manager->getLogger('abc');
 }
Ejemplo n.º 2
0
 /**
  * @param Config $config
  * @param Router\RouteManager $router
  * @param Auth\Service $authService
  * @param Log\Manager $handler
  * @param ResponseManager $responseManager
  * @throws Log\Exception\LoggerNotRegistered
  */
 public function __construct(Config $config, Di\Container $di, Router\RouteManager $router, Auth\Service $authService, Log\Manager $handler, ResponseManager $responseManager)
 {
     $this->config = $config;
     $this->serviceLocator = $di;
     $this->router = $router;
     $this->authService = $authService;
     $this->errorLog = $handler->getLogger('error');
     $this->eventLog = $handler->getLogger('event');
     $this->responseManager = $responseManager;
     $this->authService->resume();
 }