Beispiel #1
0
 /**
  * Test for method RenderTimestampAsTable
  */
 public function testRenderTimestampAsTableSuccess()
 {
     $Vlog = new \Toeswade\Log\Vlog();
     // Create log for test
     $Clog = new \Toeswade\Log\Clog();
     $class = 'Test Class';
     $method = 'Test Method';
     $comment = 'Test Comment';
     $Clog->stamp($class, $method, $comment);
     // Get log and render it
     $timestamps = $Clog->getLogAsArray();
     $res = $Vlog->renderTimestampAsTable($timestamps, 1, 2);
     $this->assertInternalType('string', $res);
 }
Beispiel #2
0
 /**
  * Test that the stamp method saves the values correctly
  *
  * @return void
  *
  */
 public function testStamp()
 {
     $Clog = new \Toeswade\Log\Clog();
     $class = 'Test Class';
     $method = 'Test Method';
     $comment = 'Test Comment';
     $Clog->stamp($class, $method, $comment);
     $res = $Clog->getLogAsArray();
     $resClass = $res[0]['domain'];
     $this->assertEquals($resClass, $class, "The registered class doesn't match the result");
     $resMethod = $res[0]['where'];
     $this->assertEquals($resMethod, $method, "The registered method doesn't match the result");
     $resComment = $res[0]['comment'];
     $this->assertEquals($resComment, $comment, "The registered comment doesn't match the result");
 }