From a55bad796d2d14454e9bc854d5f183ac45c6a95c Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Wed, 19 Sep 2018 14:08:37 +0200 Subject: Fix procrunner test_forbid_stderr Apparently python 3.7 now prints '(null)' instead of 'python', so let's use bash for this test. Signed-off-by: Florian Pritz --- application/test/tests/test_libraries_procrunner.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/test/tests/test_libraries_procrunner.php b/application/test/tests/test_libraries_procrunner.php index 4e6adf8dd..b077f991c 100644 --- a/application/test/tests/test_libraries_procrunner.php +++ b/application/test/tests/test_libraries_procrunner.php @@ -95,7 +95,7 @@ class test_libraries_procrunner extends \test\Test { public function test_forbid_stderr() { - $p = new \libraries\ProcRunner(['python', 'thisDoesNotExist']); + $p = new \libraries\ProcRunner(['bash', '-c', 'echo "This is a test error message" >&2; exit 2;']); $p->forbid_stderr(); try { @@ -104,12 +104,12 @@ class test_libraries_procrunner extends \test\Test { } catch (\exceptions\ApiException $e) { $this->t->is($e->get_error_id(), 'procrunner/stderr', "correct exception triggered"); $this->t->is_deeply($e->get_data(), [ - "'python' 'thisDoesNotExist'", + "'bash' '-c' 'echo \"This is a test error message\" >&2; exit 2;'", null, [ 'return_code' => 2, 'stdout' => '', - 'stderr' => "python: can't open file 'thisDoesNotExist': [Errno 2] No such file or directory\n", + 'stderr' => "This is a test error message\n", ], ], "correct exception data"); } -- cgit v1.2.3-24-g4f1b