Skip to content
This repository has been archived by the owner on Apr 29, 2022. It is now read-only.

Commit

Permalink
Look for phpunit.xml to load tests for a module.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Schmidt committed Apr 20, 2015
1 parent 12a0108 commit 78d72e6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/LinusShops/Prophet/TestRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,19 @@ class TestRunner
/**
* Call the same functions used by the CLI PHPUnit
* to engage the tests
* @param string $phpunitXml path to the phpunit.xml to use
* @param string $modulePath path to the phpunit.xml to use
* @return int
* 0: Tests successful
* 1: Tests failed
* 2: Failed with exception
*/
public function run($phpunitXml)
public function run($modulePath)
{
$runner = new \PHPUnit_TextUI_Command();
$options = array(
'--configuration' => $phpunitXml
'phpunit',
'--configuration',
$modulePath.'/phpunit.xml'
);

return $runner->run($options, false);
Expand Down

0 comments on commit 78d72e6

Please sign in to comment.