diff --git a/tests/bats/functional_core_commands.bats b/tests/bats/functional_core_commands.bats index 6be3e171..17f513c4 100755 --- a/tests/bats/functional_core_commands.bats +++ b/tests/bats/functional_core_commands.bats @@ -4,10 +4,14 @@ setup() { load 'test_helper/bats-support/load' load 'test_helper/bats-assert/load' - if [ -z "$PHP_BIN" ]; then - export PHP_BIN="$(which php)" + declare PHP_BIN + PHP_BIN=$(which php) + if [ $? -ne 0 ]; then + echo "Error: PHP binary not found" + exit 1 fi + if [ -z "$N98_MAGERUN2_BIN" ]; then echo "ENV variable N98_MAGERUN2_BIN is missing" exit 1 diff --git a/tests/bats/functional_magerun_commands.bats b/tests/bats/functional_magerun_commands.bats index 38e3ebdf..83088a7b 100755 --- a/tests/bats/functional_magerun_commands.bats +++ b/tests/bats/functional_magerun_commands.bats @@ -11,10 +11,6 @@ setup() { exit 1 fi - if [ -z "$PHP_BIN" ]; then - export PHP_BIN="$(which php)" - fi - if [ -z "$N98_MAGERUN2_BIN" ]; then echo "ENV variable N98_MAGERUN2_BIN is missing" exit 1