When i pass variable via htaccess it works fine and zend framework works with testing database. But i want to pass env variable only when run tests. So htaccess is not my way. Now i try to run tests via bash with APP_ENV variable passed, but nothing happened. My bash script:
#!/bin/bash
export APP_ENV="testing"
codecept="vendor/bin/codecept"
doc="vendor/bin/doctrine-module"
folderUp2="../../"
echo "[$1] Clearing query cache >>> " & $doc orm:clear-cache:query
echo "[$1] Clearing metadata cache >>> " & $doc orm:clear-cache:metadata
echo "[$1] Clearing result cache >>> " & $doc orm:clear-cache:result
echo "[$1] Updating >>> " & $doc orm:schema-tool:update --force
echo "[$1] Importing >>> " & $doc data-fixture:import --append
if [ $1 ]; then
$codecept run tests/$1;
else
$codecept run;
fi