mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-41587 tool_behat: Adding site name constant
This commit is contained in:
parent
3b7d3fb8d7
commit
19f6703d8b
2 changed files with 8 additions and 3 deletions
|
@ -42,6 +42,11 @@ require_once(__DIR__ . '/../../filelib.php');
|
||||||
*/
|
*/
|
||||||
class behat_util extends testing_util {
|
class behat_util extends testing_util {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The behat test site fullname and shortname.
|
||||||
|
*/
|
||||||
|
const BEHATSITENAME = "Acceptance test site";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array Files to skip when resetting dataroot folder
|
* @var array Files to skip when resetting dataroot folder
|
||||||
*/
|
*/
|
||||||
|
@ -70,8 +75,8 @@ class behat_util extends testing_util {
|
||||||
$options = array();
|
$options = array();
|
||||||
$options['adminuser'] = 'admin';
|
$options['adminuser'] = 'admin';
|
||||||
$options['adminpass'] = 'admin';
|
$options['adminpass'] = 'admin';
|
||||||
$options['fullname'] = 'Acceptance test site';
|
$options['fullname'] = self::BEHATSITENAME;
|
||||||
$options['shortname'] = 'Acceptance test site';
|
$options['shortname'] = self::BEHATSITENAME;
|
||||||
|
|
||||||
install_cli_database($options, false);
|
install_cli_database($options, false);
|
||||||
|
|
||||||
|
|
|
@ -185,7 +185,7 @@ class behat_hooks extends behat_base {
|
||||||
if (self::is_first_scenario()) {
|
if (self::is_first_scenario()) {
|
||||||
$notestsiteexception = new Exception('The base URL (' . $CFG->wwwroot . ') is not a behat test site, ' .
|
$notestsiteexception = new Exception('The base URL (' . $CFG->wwwroot . ') is not a behat test site, ' .
|
||||||
'ensure you started the built-in web server in the correct directory or your web server is correctly started and set up');
|
'ensure you started the built-in web server in the correct directory or your web server is correctly started and set up');
|
||||||
$this->find("xpath", "//head/child::title[normalize-space(.)='Acceptance test site']", $notestsiteexception);
|
$this->find("xpath", "//head/child::title[normalize-space(.)='" . behat_util::BEHATSITENAME . "']", $notestsiteexception);
|
||||||
|
|
||||||
self::$initprocessesfinished = true;
|
self::$initprocessesfinished = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue