diff options
author | Florian Pritz <bluewind@xinu.at> | 2018-09-19 14:08:37 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2018-09-19 14:08:39 +0200 |
commit | a55bad796d2d14454e9bc854d5f183ac45c6a95c (patch) | |
tree | e3d9b60335bb3c1027fd50e604fc7288b19c25e9 | |
parent | 7fddb2e465fe980478c385353e8b9c081f7c2b25 (diff) |
Fix procrunner test_forbid_stderr3.3.0
Apparently python 3.7 now prints '(null)' instead of 'python', so let's
use bash for this test.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r-- | application/test/tests/test_libraries_procrunner.php | 6 |
1 files 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"); } |