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(); }
/** * @param $customers * @param $exception * @param $customer */ private function error($customers, RobinSendFailedException $exception, $customer) { $this->robinLogger->sendError($customers, $exception->getResponse()->getReasonPhrase(), $exception->getMessage(), $customer); }