Skip to content

Commit

Permalink
MDL-37046 behat: Skip unit test if behat is not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
David Monllao committed Jan 29, 2013
1 parent 475ac3f commit ec017a3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions admin/tool/behat/tests/tool_behat_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ public function test_merge_configs() {
public function test_config_file_contents() {
global $CFG;

// Skip tests if behat is not installed.
$vendorpath = $CFG->dirroot . '/vendor';
if (!file_exists($vendorpath . '/autoload.php') || !is_dir($vendorpath . '/behat')) {
$this->markTestSkipped('Behat not installed.');
}

// To avoid user value at config.php level.
unset($CFG->behat_config);

Expand Down

0 comments on commit ec017a3

Please sign in to comment.