render() 공개 메소드

Renders the test output (e.g. layouts and filter templates).
public render ( string $template, string | array $data = [] ) : string
$template string name of the template (i.e. `'layout'`).
$data string | array array from `_data()` method.
리턴 string
예제 #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);
 }
예제 #2
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' => 'html', 'reporter' => 'html'));
     $report->run();
     $result = $report->render("stats");
     $this->assertPattern("/1 \\/ 1 passes, 0  fails\tand 0  exceptions/", $result);
 }
예제 #3
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' => 'html', 'reporter' => 'html'));
     $report->run();
     $result = $report->render("stats");
     $this->assertPattern("#1.*1.*passes,.*0.*fails.*0.*exceptions#s", $result);
 }