Ejemplo n.º 1
0
<?php

ini_set('error_reporting', E_ALL);
ini_set('display_errors', 0);
require __DIR__ . '/../bootstrap.php';
$client = \Logriver\Client::init('12345baced3340aa940fc402e652d30d');
$client->setDebugMode(1);
$client->startListener();
trigger_error("test real error", E_USER_ERROR);
Ejemplo n.º 2
0
 public function testFatalError()
 {
     $client = \Logriver\Client::init('12345baced3340aa940fc402e652d30d');
     $client->setDebugMode();
     $client->startListener();
     $serialized = exec('php ' . __DIR__ . '/SimFatalError.php');
     $model = unserialize($serialized);
     $this->assertEquals($model->type, 5);
     $this->assertEquals(basename($model->file), 'SimFatalError.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, 'Call to undefined function functionNotExists()');
     $this->assertEquals($model->ct, 1);
     $this->assertEquals($model->cat, 2);
     $this->assertTrue(is_array($model->ds));
     $this->assertNull($model->t);
     //$this->assertEquals(count($model->t), 1);
     $this->assertNull($model->md);
 }