Want to run PHPUnit testsuite independence? Following is an example to run PHPUnit testsuite independence.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<?php class Test extends PHPUnit_Framework_TestCase { public function testOne() { define('FOO', 'BAR'); $this->assertEquals('BAR', FOO); } public function testTwo() { define('FOO', 'BAZ'); $this->assertEquals('BAZ', FOO); } } |
Output will look like:
1 2 3 4 5 6 7 8 9 |
phpunit --process-isolation processTest.php PHPUnit @package_version@ by Sebastian Bergmann. .. Time: 0 seconds, Memory: 1.25Mb OK (2 tests, 2 assertions) |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.