diff --git a/autoload.php b/autoload.php index 5c33293b..6c18d5b7 100644 --- a/autoload.php +++ b/autoload.php @@ -39,3 +39,7 @@ } else { throw new \Exception("Unable to find the an autoloader"); } + +if (file_exists('test' . DIRECTORY_SEPARATOR . 'bootstrap.php')) { + require_once 'test' . DIRECTORY_SEPARATOR . 'bootstrap.php'; +} \ No newline at end of file diff --git a/test/Liip/RMT/Tests/Functional/GitTest.php b/test/Liip/RMT/Tests/Functional/GitTest.php index b10091ee..650ad908 100644 --- a/test/Liip/RMT/Tests/Functional/GitTest.php +++ b/test/Liip/RMT/Tests/Functional/GitTest.php @@ -13,6 +13,16 @@ class GitTest extends RMTFunctionalTestBase { + protected function setUp() + { + if (SKIP_GIT_TESTS) { + $this->markTestSkipped('GIT is not installed'); + } + + parent::setUp(); // TODO: Change the autogenerated stub + } + + public function testInitialVersion() { $this->initGit(); diff --git a/test/Liip/RMT/Tests/Functional/HgTest.php b/test/Liip/RMT/Tests/Functional/HgTest.php index ad6b6459..69cc470a 100644 --- a/test/Liip/RMT/Tests/Functional/HgTest.php +++ b/test/Liip/RMT/Tests/Functional/HgTest.php @@ -13,6 +13,16 @@ class HgTest extends RMTFunctionalTestBase { + protected function setUp() + { + if (SKIP_HG_TESTS) { + $this->markTestSkipped('HG is not installed'); + } + + parent::setUp(); + } + + public static function cleanTags($tags) { return array_map(function ($t) { diff --git a/test/Liip/RMT/Tests/Unit/VCS/GitTest.php b/test/Liip/RMT/Tests/Unit/VCS/GitTest.php index f96a938c..01254463 100644 --- a/test/Liip/RMT/Tests/Unit/VCS/GitTest.php +++ b/test/Liip/RMT/Tests/Unit/VCS/GitTest.php @@ -19,6 +19,10 @@ class GitTest extends \PHPUnit_Framework_TestCase protected function setUp() { + if (SKIP_GIT_TESTS) { + $this->markTestSkipped('GIT is not installed'); + } + // Create a temp folder and extract inside the git test folder $tempDir = tempnam(sys_get_temp_dir(), ''); if (file_exists($tempDir)) { diff --git a/test/Liip/RMT/Tests/Unit/VCS/HgTest.php b/test/Liip/RMT/Tests/Unit/VCS/HgTest.php index beef3c7a..fc00b573 100644 --- a/test/Liip/RMT/Tests/Unit/VCS/HgTest.php +++ b/test/Liip/RMT/Tests/Unit/VCS/HgTest.php @@ -19,6 +19,10 @@ class HgTest extends \PHPUnit_Framework_TestCase protected function setUp() { + if (SKIP_HG_TESTS) { + $this->markTestSkipped('HG is not installed'); + } + // Create a temp folder and extract inside the Hg test folder $tempDir = tempnam(sys_get_temp_dir(), ''); if (file_exists($tempDir)) { diff --git a/test/bootstrap.php b/test/bootstrap.php new file mode 100644 index 00000000..fbc2869c --- /dev/null +++ b/test/bootstrap.php @@ -0,0 +1,20 @@ +