From f9b08cb0ac0f527ad9693ec0a3eb30392504eedf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Bl=C3=A4ul?= Date: Thu, 29 Aug 2024 17:29:41 +0200 Subject: [PATCH] Re-add support for PHPUnit 6.5.14 and PHP ^7.0 --- tests/methods/ConstructTest.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/methods/ConstructTest.php b/tests/methods/ConstructTest.php index 5b3bfc2..ba57f00 100644 --- a/tests/methods/ConstructTest.php +++ b/tests/methods/ConstructTest.php @@ -61,8 +61,13 @@ public function testCodeExamples() { $ob_get_clean = ob_get_clean(); $verb = strtok($script_file, '_.'); - if (!in_array($verb, ['download', 'save'], true)) { - $this->assertStringContainsString('', $ob_get_clean); + if (!in_array($verb, ['download', 'save'], TRUE)) { + if (method_exists($this, 'assertStringContainsString')) { + $this->assertStringContainsString('', $ob_get_clean); + } + else { + $this->assertContains('', $ob_get_clean); + } } } chdir('..');