Check if output contains HTML table cells

They should if the _books.csv file is found
This commit is contained in:
Christian Bläul
2018-02-21 19:25:39 +01:00
parent 3968659b9f
commit 2ac9f450f1

View File

@@ -78,9 +78,14 @@ class ConstructTest extends TestCase {
* @see https://github.com/sebastianbergmann/phpunit/issues/720#issuecomment-10421092
*/
public function testCodeExamples() {
foreach (glob('examples/*.php') as $script_file) {
chdir('examples');
foreach (glob('*.php') as $script_file) {
ob_start();
/** @noinspection PhpIncludeInspection */
require $script_file;
if ($script_file != 'download.php') {
$this->assertContains('<td>', ob_get_clean());
}
}
}
}