Skip to content

Commit

Permalink
MDL-52226 tests: Fix behat phpunit naming conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
David Monllao authored and danpoltawski committed Dec 21, 2015
1 parent 0702136 commit 145467f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions lib/tests/behat/largeforms.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Feature: Forms with a large number of fields
| Course 1 | C1 | topics |
And the following "activities" exist:
| activity | name | intro | course | idnumber |
| label | L1 | <a href="../lib/tests/fixtures/max_input_vars_test.php">FixtureLink</a> | C1 | label1 |
| label | L1 | <a href="../lib/tests/fixtures/max_input_vars.php">FixtureLink</a> | C1 | label1 |
When I log in as "admin"
And I am on site homepage
And I follow "Course 1"
Expand All @@ -23,7 +23,7 @@ Feature: Forms with a large number of fields
Scenario: Small form with checkboxes (not using workaround)
When I follow "Advanced checkboxes / Small"
And I press "Submit here!"
Then I should see "_qf__core_max_input_vars_test_form=1"
Then I should see "_qf__core_max_input_vars_form=1"
And I should see "mform_isexpanded_id_general=1"
And I should see "arraytest=[13,42]"
And I should see "array2test=[13,42]"
Expand All @@ -34,7 +34,7 @@ Feature: Forms with a large number of fields
Scenario: Medium length form with checkboxes (needs workaround)
When I follow "Advanced checkboxes / Below limit"
And I press "Submit here!"
Then I should see "_qf__core_max_input_vars_test_form=1"
Then I should see "_qf__core_max_input_vars_form=1"
And I should see "mform_isexpanded_id_general=1"
And I should see "arraytest=[13,42]"
And I should see "array2test=[13,42]"
Expand All @@ -45,7 +45,7 @@ Feature: Forms with a large number of fields
Scenario: Exact PHP limit length form with checkboxes (uses workaround but doesn't need it)
When I follow "Advanced checkboxes / Exact PHP limit"
And I press "Submit here!"
Then I should see "_qf__core_max_input_vars_test_form=1"
Then I should see "_qf__core_max_input_vars_form=1"
And I should see "mform_isexpanded_id_general=1"
And I should see "arraytest=[13,42]"
And I should see "array2test=[13,42]"
Expand All @@ -56,7 +56,7 @@ Feature: Forms with a large number of fields
Scenario: Longer than the limit with checkboxes (needs workaround)
When I follow "Advanced checkboxes / Above limit"
And I press "Submit here!"
Then I should see "_qf__core_max_input_vars_test_form=1"
Then I should see "_qf__core_max_input_vars_form=1"
And I should see "mform_isexpanded_id_general=1"
And I should see "arraytest=[13,42]"
And I should see "array2test=[13,42]"
Expand All @@ -67,7 +67,7 @@ Feature: Forms with a large number of fields
Scenario: Small form with array fields (not using workaround)
When I follow "Select options / Small"
And I press "Submit here!"
Then I should see "_qf__core_max_input_vars_test_form=1"
Then I should see "_qf__core_max_input_vars_form=1"
And I should see "mform_isexpanded_id_general=1"
And I should see "arraytest=[13,42]"
And I should see "array2test=[13,42]"
Expand All @@ -78,7 +78,7 @@ Feature: Forms with a large number of fields
Scenario: Below limit form with array fields (uses workaround but doesn't need it)
When I follow "Select options / Below limit"
And I press "Submit here!"
Then I should see "_qf__core_max_input_vars_test_form=1"
Then I should see "_qf__core_max_input_vars_form=1"
And I should see "mform_isexpanded_id_general=1"
And I should see "arraytest=[13,42]"
And I should see "array2test=[13,42]"
Expand All @@ -89,7 +89,7 @@ Feature: Forms with a large number of fields
Scenario: Exact PHP limit length form with array fields (uses workaround but doesn't need it)
When I follow "Select options / Exact PHP limit"
And I press "Submit here!"
Then I should see "_qf__core_max_input_vars_test_form=1"
Then I should see "_qf__core_max_input_vars_form=1"
And I should see "mform_isexpanded_id_general=1"
And I should see "arraytest=[13,42]"
And I should see "array2test=[13,42]"
Expand All @@ -100,7 +100,7 @@ Feature: Forms with a large number of fields
Scenario: Longer than the limit with array fields (needs workaround)
When I follow "Select options / Above limit"
And I press "Submit here!"
Then I should see "_qf__core_max_input_vars_test_form=1"
Then I should see "_qf__core_max_input_vars_form=1"
And I should see "mform_isexpanded_id_general=1"
And I should see "arraytest=[13,42]"
And I should see "array2test=[13,42]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* @copyright 2015 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class core_max_input_vars_test_form extends moodleform {
class core_max_input_vars_form extends moodleform {
/**
* Form definition.
*/
Expand Down Expand Up @@ -93,7 +93,7 @@ public function definition() {
$type = optional_param('type', '', PARAM_ALPHA);

// Set up the page details.
$PAGE->set_url(new moodle_url('/lib/tests/fixtures/max_input_vars_test.php'));
$PAGE->set_url(new moodle_url('/lib/tests/fixtures/max_input_vars.php'));
$PAGE->set_context($context);

if ($type) {
Expand All @@ -117,7 +117,7 @@ public function definition() {
$fieldcount = (int)ini_get('max_input_vars') + 100;
}

$mform = new core_max_input_vars_test_form('max_input_vars_test.php',
$mform = new core_max_input_vars_form('max_input_vars.php',
array('type' => $type, 'fieldcount' => $fieldcount, 'control' => $type[0]));
if ($type[0] === 'c') {
$data = array();
Expand Down Expand Up @@ -222,7 +222,7 @@ public function definition() {
'a' => 'Select options') as $control => $controlname) {
foreach (array('s' => 'Small', 'm' => 'Below limit', 'e' => 'Exact PHP limit',
'l' => 'Above limit') as $size => $sizename) {
echo html_writer::tag('li', html_writer::link('max_input_vars_test.php?type=' .
echo html_writer::tag('li', html_writer::link('max_input_vars.php?type=' .
$control . $size, $controlname . ' / ' . $sizename));
}
}
Expand Down

0 comments on commit 145467f

Please sign in to comment.