From fe6735ac2fc1e48a055c32968573397fa16ad32f Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Mon, 12 Sep 2022 12:54:21 +0800 Subject: [PATCH 1/1] DEMO --- course/tests/behat/behat_course.php | 8 ++++++++ lib/tests/behat/behat_hooks.php | 7 +++++++ .../tests/behat/behat_mod_bigbluebuttonbn.php | 7 +++++++ 3 files changed, 22 insertions(+) diff --git a/course/tests/behat/behat_course.php b/course/tests/behat/behat_course.php index 9a21a979e1..192822d23f 100644 --- a/course/tests/behat/behat_course.php +++ b/course/tests/behat/behat_course.php @@ -42,6 +42,14 @@ use Behat\Gherkin\Node\TableNode as TableNode, */ class behat_course extends behat_base { + /** + * @BeforeScenario + */ + public function test_foo(): void { + error_log("Setting 'foo' to 'bar' in " . __FILE__); + set_config('foo', 'bar'); + } + /** * Return the list of partial named selectors. * diff --git a/lib/tests/behat/behat_hooks.php b/lib/tests/behat/behat_hooks.php index bed501645c..d83e01ac8b 100644 --- a/lib/tests/behat/behat_hooks.php +++ b/lib/tests/behat/behat_hooks.php @@ -121,6 +121,13 @@ class behat_hooks extends behat_base { */ protected static $scenariotags; + /** + * @BeforeScenario + */ + public function test_bar(): void { + error_log("Looking in " . __FILE__ . " at a value of: " . var_export(get_config('moodle', 'foo'), true)); + } + /** * Gives access to moodle codebase, ensures all is ready and sets up the test lock. * diff --git a/mod/bigbluebuttonbn/tests/behat/behat_mod_bigbluebuttonbn.php b/mod/bigbluebuttonbn/tests/behat/behat_mod_bigbluebuttonbn.php index 043adea773..bb67f80728 100644 --- a/mod/bigbluebuttonbn/tests/behat/behat_mod_bigbluebuttonbn.php +++ b/mod/bigbluebuttonbn/tests/behat/behat_mod_bigbluebuttonbn.php @@ -50,6 +50,13 @@ class behat_mod_bigbluebuttonbn extends behat_base { } } + /** + * @BeforeScenario + */ + public function test_bar(): void { + error_log("Looking in " . __FILE__ . " at a value of: " . var_export(get_config('moodle', 'foo'), true)); + } + /** * Check that the TEST_MOD_BIGBLUEBUTTONBN_MOCK_SERVER is defined, so we can connect to the mock server. * -- 2.37.0