I'm testing a Zend Framework application using PHPUnit and Jenkins. I need to override the APPLICATION_ENV
environment variable which is access using PHP's getenv
in the PHPUnit bootstrap.php
file:
<?php
// Define application environment
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'testing'));
... use APPLICATION_ENV to pick database, configuration, etc. ...
I have two environments: testing
(for local machines) and testing-ci
(for Jenkins machine). How can I set the variable to testing-ci
when it runs in Jenkins? Is there any way to set it in build.xml
for Ant or Phing?