public function testCaptureEvent() { $client = Logriver_Client::init('12345baced3340aa940fc402e652d30d'); $client->setDebugMode(); $client->startListener(); Logriver_Client::captureEvent('test event'); $model = $client->getDebugModel(); $this->assertEquals($model->type, 1); $this->assertEquals(basename($model->file), 'ClientTest.php'); $this->assertTrue(is_int($model->line)); $this->assertTrue(is_double($model->mt)); $this->assertTrue(is_string($model->m)); $this->assertTrue(is_double($model->st)); $this->assertEquals($model->message, 'test event'); $this->assertNull($model->ct); $this->assertEquals($model->cat, 2); $this->assertTrue(is_array($model->ds)); $this->assertNull($model->t); $this->assertNull($model->md); }
/** * LogRiver global functions * * A class to send data to LogRiver's servers. * * @author LogRiver <*****@*****.**> * @since January 1, 2014 — Last update January 25, 2015 * @link https://logriver.io * @version 0.1.1 */ function Logriver_captureEvent($message) { Logriver_Client::captureEvent($message); }