/**
  * @param LoggerInterface $logger
  * @param Notification $notification
  * @param bool $success
  * @param array $context
  * @return bool
  */
 public function logToFile(LoggerInterface $logger, Notification $notification, $success = true, array $context = [])
 {
     $data = ['receivers' => $notification->getDevices(), 'content' => $notification->getContent(), 'data' => $notification->getData()];
     $data = array_merge($data, $context);
     if ($success) {
         $logger->info('Pushmessage sent', $data);
     } else {
         $logger->error('Error sending pushmessage', $data);
     }
     return true;
 }
 /**
  * Test method for the <tt>getContent()</tt> and <tt>setContent($aDM)</tt> functions.
  */
 public function testGetSetContent()
 {
     $notification = new Notification();
     $this->assertNull($notification->getContent());
     $this->assertSame($notification, $notification->setContent('CONTENT'));
     $this->assertEquals('CONTENT', $notification->getContent());
 }