function testWrite()
 {
     $writer = new lmbLogSyslogWriter(new lmbUri());
     $writer->write(new lmbLogEntry(LOG_ERR, "foo\nbar"));
     $content = file_get_contents('/var/log/syslog');
     $this->assertPattern('/Error/', $content);
     $this->assertPattern('/foo/', $content);
 }
 function testWrite()
 {
     $writer = new lmbLogSyslogWriter(new lmbUri());
     $identifier = mt_rand();
     $writer->write(new lmbLogEntry(LOG_ERR, "foo\nbar" . $identifier));
     usleep(500000);
     //ugly hack for syslogd
     $content = file_get_contents('/var/log/syslog');
     $this->assertPattern('/Error/', $content);
     $this->assertPattern('/foo/', $content);
     $this->assertPattern('/' . $identifier . '/', $content);
 }