Merge branch 'MDL-39702_master' of git://github.com/dmonllao/moodle
Conflicts: lib/testing/generator/repository_generator.php
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
/**
|
||||
* Block generator base class.
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
/**
|
||||
* Component generator base class.
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
/**
|
||||
* Data generator class for unit tests and other tools that need to create fake test sites.
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
/**
|
||||
* Module generator base class.
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
/**
|
||||
* Repository data generator class
|
||||
*
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
// NOTE: no MOODLE_INTERNAL test here, this file may be required by behat before including /config.php.
|
||||
|
||||
require_once(__DIR__ . '/../../behat/behat_base.php');
|
||||
require_once(__DIR__ . '/../../testing/generator/lib.php');
|
||||
|
||||
use Behat\Gherkin\Node\TableNode as TableNode;
|
||||
use Behat\Behat\Exception\PendingException as PendingException;
|
||||
@@ -127,6 +126,9 @@ class behat_data_generators extends behat_base {
|
||||
*/
|
||||
public function the_following_exists($elementname, TableNode $data) {
|
||||
|
||||
// Now that we need them require the data generators.
|
||||
require_once(__DIR__ . '/../../testing/generator/lib.php');
|
||||
|
||||
if (empty(self::$elements[$elementname])) {
|
||||
throw new PendingException($elementname . ' data generator is not implemented');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user