Example #1
0
 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), 13);
     $this->assertNull($model->md);
 }