Merge branch 'MDL-46916_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE

This commit is contained in:
Marina Glancy
2014-08-25 16:50:05 +08:00
+3 -3
View File
@@ -75,12 +75,12 @@ class behat_question extends behat_question_base {
// Split in two checkings to give more feedback in case of exception.
$exception = new ElementNotFoundException($this->getSession(), 'Question "' . $questiondescription . '" ');
$questionxpath = "//div[contains(concat(' ', normalize-space(@class), ' '), ' qtext ')][contains(., $questiondescriptionliteral)]";
$questionxpath = "//div[contains(concat(' ', normalize-space(@class), ' '), ' que ')]" .
"[contains(div[@class='content']/div[@class='formulation'], {$questiondescriptionliteral})]";
$this->find('xpath', $questionxpath, $exception);
$exception = new ExpectationException('Question "' . $questiondescription . '" state is not "' . $state . '"', $this->getSession());
$xpath = $questionxpath . "/ancestor::div[contains(concat(' ', normalize-space(@class), ' '), ' que ')]" .
"/descendant::div[@class='state'][contains(., $stateliteral)]";
$xpath = $questionxpath . "/div[@class='info']/div[@class='state' and contains(., {$stateliteral})]";
$this->find('xpath', $xpath, $exception);
}
}