From 2ac9f450f187850a3a1d2151f836891804ca69ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Bl=C3=A4ul?= Date: Wed, 21 Feb 2018 19:25:39 +0100 Subject: [PATCH] Check if output contains HTML table cells They should if the _books.csv file is found --- tests/methods/ConstructTest.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/methods/ConstructTest.php b/tests/methods/ConstructTest.php index 48330ae..3da03a4 100644 --- a/tests/methods/ConstructTest.php +++ b/tests/methods/ConstructTest.php @@ -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('', ob_get_clean()); + } } } }