MDL-58428 theme: Shift templates ready for Bootstrapbase removal
[moodle.git] / theme / bootstrapbase / tests / behat / behat_theme_bootstrapbase_behat_deprecated.php
CommitLineData
02fda279
VDF
1<?php
2// This file is part of Moodle - http://moodle.org/
3//
4// Moodle is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8//
9// Moodle is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13//
14// You should have received a copy of the GNU General Public License
15// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
16
17/**
18 * Deprecated steps overrides.
19 *
e3652936
MM
20 * @package theme_bootstrapbase
21 * @category test
02fda279
VDF
22 * @copyright 2018 Victor Deniz
23 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
24 */
25
26// NOTE: no MOODLE_INTERNAL test here, this file may be required by behat before including /config.php.
27
28require_once(__DIR__ . '/../../../../lib/tests/behat/behat_deprecated.php');
29
30/**
31 * Deprecated behat step definitions.
32 *
e3652936 33 * @package theme_bootstrapbase
02fda279
VDF
34 * @category test
35 * @copyright 2018 Victor Deniz
36 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
37 */
e3652936 38class behat_theme_bootstrapbase_behat_deprecated extends behat_deprecated {
02fda279
VDF
39
40 /**
41 * Click link in navigation tree that matches the text in parentnode/s (seperated using greater-than character if more than one)
42 *
e3652936
MM
43 * @Given /^I navigate to "(?P<nodetext_string>(?:[^"]|\\")*)" node in "(?P<parentnodes_string>(?:[^"]|\\")*)"$/
44 *
02fda279
VDF
45 * @throws ExpectationException
46 * @param string $nodetext navigation node to click.
47 * @param string $parentnodes comma seperated list of parent nodes.
48 * @return void
49 * @deprecated since Moodle 3.6 MDL-57281 - please do not use this definition step any more.
50 * @todo MDL-63004 This will be deleted in Moodle 4.0.
51 */
52 public function i_navigate_to_node_in($nodetext, $parentnodes) {
53 $alternative[] = 'I navigate to "PATH" in current page administration';
54 $alternative[] = 'I navigate to "PATH" in site administration';
55 $alternative[] = 'I navigate to "TAB1 > TAB2" in the course gradebook';
56 $alternative[] = 'I navigate to course participants';
57 $alternative[] = 'If some items are not available without Navigation block at all, one can use combination of:
58 I add the "Navigation" block if not present
59 I click on "LINK" "link" in the "Navigation" "block"';
60
61 $this->deprecated_message($alternative);
62
63 $parentnodes = array_map('trim', explode('>', $parentnodes));
e3652936 64 $this->execute('behat_navigation::select_node_in_navigation', array($nodetext, $parentnodes));
02fda279
VDF
65 }
66}