Permalink
Browse files

Merge branch 'MDL-37789_master' of git://github.com/dmonllao/moodle

  • Loading branch information...
2 parents 12f756f + 6b1a8fc commit 3895cdc2b74d6aa07e713c02d1968d43281c3e8e @danpoltawski danpoltawski committed Jan 31, 2013
Showing with 11 additions and 2 deletions.
  1. +11 −2 admin/tool/behat/tests/tool_behat_test.php
View
13 admin/tool/behat/tests/tool_behat_test.php
@@ -169,10 +169,19 @@ public function test_config_file_contents() {
$contents = testable_behat_config_manager::get_config_file_contents($features, $stepsdefinitions);
- $this->assertContains('features: ' . $CFG->dirroot . '/lib/behat/features', $contents);
+ // YAML decides when is is necessary to wrap strings between single quotes, so not controlled
+ // values like paths should not be asserted including the key name as they would depend on the
+ // directories values.
+ $this->assertContains($CFG->dirroot . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'behat' . DIRECTORY_SEPARATOR . 'features', $contents);
+
+ // Not quoted strings.
$this->assertContains('micarro: /me/lo/robaron', $contents);
- $this->assertContains('base_url: \'' . $CFG->behat_wwwroot . '\'', $contents);
$this->assertContains('class: behat_init_context', $contents);
+
+ // YAML uses single quotes to wrap URL strings.
+ $this->assertContains("base_url: '" . $CFG->behat_wwwroot . "'", $contents);
+
+ // Lists.
$this->assertContains('- feature1', $contents);
$this->assertContains('- feature3', $contents);
}

0 comments on commit 3895cdc

Please sign in to comment.