stats() public method

Return statistics from the test runs.
public stats ( ) : array
return array
Ejemplo n.º 1
0
 public function testRender()
 {
     $report = new Report(array('title' => '\\lithium\\tests\\mocks\\test\\MockUnitTest', 'group' => new Group(array('data' => array('\\lithium\\tests\\mocks\\test\\MockUnitTest'))), 'format' => 'txt'));
     $report->run();
     $result = $report->render('result', $report->stats());
     $this->assertPattern('#2.*2.*passes.*0.*fails.*0.*exceptions#s', $result);
 }
Ejemplo n.º 2
0
 public function testStats()
 {
     $report = new Report(array('title' => '\\lithium\\tests\\mocks\\test\\MockUnitTest', 'group' => new Group(array('items' => array('\\lithium\\tests\\mocks\\test\\MockUnitTest')))));
     $report->run();
     $expected = "1 / 1 passes\n0 fails and 0 exceptions";
     $result = $report->stats();
     $this->assertEqual($expected, $result);
 }
Ejemplo n.º 3
0
 public function testStats()
 {
     $report = new Report(array('title' => '\\lithium\\tests\\mocks\\test\\MockUnitTest', 'group' => new Group(array('data' => array('\\lithium\\tests\\mocks\\test\\MockUnitTest')))));
     $report->run();
     $expected = 1;
     $result = $report->stats();
     $this->assertEqual($expected, $result['count']['asserts']);
     $this->assertEqual($expected, $result['count']['passes']);
     $this->assertTrue($result['success']);
 }