public function testDataProvider() { $r = new HttpPHPUnit\ResultPrinter(); $t = new self('DataProvider', array(1, 2, '<b>3</b>')); $r->setAutoFlush(false); $r->dir = __DIR__; $r->addError($t, new Exception(), 0); $content = file_get_contents($this->readAttribute($r, 'file')); $this->assertContains('<a href="?test=/ResultPrinter_getTestInfo_Test.php::DataProvider+with+data+set+%22%22">ResultPrinter_getTestInfo :: DataProvider</a>', $content); }
public function testDataProviderOneLine() { $r = new HttpPHPUnit\ResultPrinter(); $t = new self('DataProvider', array(1, 2, '<b>3</b>')); $r->setAutoFlush(false); $r->addIncompleteTest($t, new Exception(), 0); $refl = new ReflectionMethod($r, 'endRun'); $refl->setAccessible(true); $refl->invoke($r); $content = file_get_contents($this->readAttribute($r, 'file')); $this->assertContains('</small><small><small> with data set "" (1, 2, \'<b>3</b>\')</small></small>', $content); }
protected function setUp() { $this->r = new HttpPHPUnit\ResultPrinter(); $this->r->setAutoFlush(false); $this->t = new self(); }