I\'m starting to write PHPUnit tests and I\'d like the tests to be run from developers machines as well as from our servers. Developers machines are set up differently than
You can use PHPUnit's --bootstrap switch for this.
--bootstrap A "bootstrap" PHP file that is run before the tests.
Then, make a bootstrap.php file that contains variables:
$port = 4445;
In your tests, you can grab those values:
global $port;
$this->setPort($port);
Then run:
phpunit --bootstrap boot.php MyTest.php