Ejemplo n.º 1
0
 /**
  * @param string $date Any date format strtotime() understands
  * @param string $author Your name
  * @param string|null $label An optional label for the tombstone
  */
 function tombstone($date, $author, $label = null)
 {
     try {
         $trace = \Scheb\Tombstone\Tracing\TraceProvider::getTraceHere();
         \Scheb\Tombstone\GraveyardProvider::getGraveyard()->tombstone($date, $author, $label, $trace);
     } catch (\Exception $e) {
     }
 }
Ejemplo n.º 2
0
 /**
  * @test
  */
 public function getTraceHere_traceContainingFunction_returnStackTrace()
 {
     $thisMethod = __FUNCTION__;
     $thisClass = __CLASS__;
     $trace = TraceProvider::getTraceHere();
     $this->assertInternalType('array', $trace);
     $this->assertGreaterThanOrEqual(3, $trace);
     $this->assertEquals($thisMethod, $trace[0]['function']);
     $this->assertEquals($thisClass, $trace[0]['class']);
 }