From ba021d12866ef494034a6b22f7f88225d9b833e2 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 21 Feb 2021 11:34:15 +0100 Subject: PHP8: Fix expected error string in test_libraries_procrunner Signed-off-by: Florian Pritz --- application/test/tests/test_libraries_procrunner.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/application/test/tests/test_libraries_procrunner.php b/application/test/tests/test_libraries_procrunner.php index b077f991c..daac8a2bc 100644 --- a/application/test/tests/test_libraries_procrunner.php +++ b/application/test/tests/test_libraries_procrunner.php @@ -49,7 +49,11 @@ class test_libraries_procrunner extends \test\Test { $p = new \libraries\ProcRunner(['thisCommandDoesNotExist']); $ret = $p->exec(); - $this->t->is($ret['stderr'], "sh: thisCommandDoesNotExist: command not found\n", 'stderr should be empty'); + if (PHP_MAJOR_VERSION >= 8) { + $this->t->is($ret['stderr'], "sh: line 1: thisCommandDoesNotExist: command not found\n", 'stderr should be empty'); + } else { + $this->t->is($ret['stderr'], "sh: thisCommandDoesNotExist: command not found\n", 'stderr should be empty'); + } $this->t->is($ret['stdout'], '', 'stdout should be empty'); $this->t->is($ret['return_code'], 127, 'return code should be 127'); } -- cgit v1.2.3-24-g4f1b