示例#1
0
 public function testLogsToFile()
 {
     $monolog = new Logger("ROBIN");
     $monolog->pushHandler(new StreamHandler(__DIR__ . '/logs/robin.log'));
     $monolog->pushProcessor(new IntrospectionProcessor());
     $logger = new RobinLogger($monolog);
     $logger->sendError(new Orders(), 500, "Missing Data", ['blaat' => 'blaat']);
     $content = $this->getLog();
     $this->assertContains('blaat', $content);
     $this->deleteLog();
 }
示例#2
0
 /**
  * @param $customers
  * @param $exception
  * @param $customer
  */
 private function error($customers, RobinSendFailedException $exception, $customer)
 {
     $this->robinLogger->sendError($customers, $exception->getResponse()->getReasonPhrase(), $exception->getMessage(), $customer);
 }