diff options
author | Florian Pritz <bluewind@xinu.at> | 2021-02-21 11:34:15 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2021-02-21 11:34:15 +0100 |
commit | ba021d12866ef494034a6b22f7f88225d9b833e2 (patch) | |
tree | f99f51a63fd01232a727182c2abb8e8b70fba5d5 /application/test | |
parent | 533e6b97deff819c3101bf81be884ea15a7b72b3 (diff) |
PHP8: Fix expected error string in test_libraries_procrunner
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/test')
-rw-r--r-- | application/test/tests/test_libraries_procrunner.php | 6 |
1 files changed, 5 insertions, 1 deletions
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'); } |