public function testCaptureError() { $client = Logriver_Client::init('12345baced3340aa940fc402e652d30d'); $client->setDebugMode(); $client->startListener(); Logriver_Client::captureError('test error'); $model = $client->getDebugModel(); $this->assertEquals($model->type, 3); $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 error'); $this->assertEquals($model->ct, 512); $this->assertEquals($model->cat, 2); $this->assertTrue(is_array($model->ds)); $this->assertTrue(is_array($model->t)); $this->assertEquals(count($model->t), 8); $this->assertNull($model->md); }
function Logriver_captureError($message) { Logriver_Client::captureError($message); }