diff --git a/course/tests/behat/behat_course.php b/course/tests/behat/behat_course.php index 6e0b1afe0c1..cf86d896d3a 100644 --- a/course/tests/behat/behat_course.php +++ b/course/tests/behat/behat_course.php @@ -817,7 +817,7 @@ class behat_course extends behat_base { /** * Clicks on the specified element of the activity. You should be in the course page with editing mode turned on. * - * @Given /^I click on "(?P(?:[^"]|\\")*)" "(?P[^"]*)" in the "(?P[^"]*)" activity$/ + * @Given /^I click on "(?P(?:[^"]|\\")*)" "(?P(?:[^"]|\\")*)" in the "(?P(?:[^"]|\\")*)" activity$/ * @param string $element * @param string $selectortype * @param string $activityname @@ -1100,7 +1100,7 @@ class behat_course extends behat_base { /** * Clicks on a category in the management interface. * - * @Given /^I click on category "(?P[^"]*)" in the management interface$/ + * @Given /^I click on category "(?P(?:[^"]|\\")*)" in the management interface$/ * @param string $name */ public function i_click_on_category_in_the_management_interface($name) { @@ -1111,7 +1111,7 @@ class behat_course extends behat_base { /** * Clicks on a course in the management interface. * - * @Given /^I click on course "(?P[^"]*)" in the management interface$/ + * @Given /^I click on course "(?P(?:[^"]|\\")*)" in the management interface$/ * @param string $name */ public function i_click_on_course_in_the_management_interface($name) { @@ -1122,7 +1122,7 @@ class behat_course extends behat_base { /** * Clicks on a category checkbox in the management interface, if not checked. * - * @Given /^I select category "(?P[^"]*)" in the management interface$/ + * @Given /^I select category "(?P(?:[^"]|\\")*)" in the management interface$/ * @param string $name */ public function i_select_category_in_the_management_interface($name) { @@ -1136,7 +1136,7 @@ class behat_course extends behat_base { /** * Clicks on a category checkbox in the management interface, if checked. * - * @Given /^I unselect category "(?P[^"]*)" in the management interface$/ + * @Given /^I unselect category "(?P(?:[^"]|\\")*)" in the management interface$/ * @param string $name */ public function i_unselect_category_in_the_management_interface($name) { @@ -1150,7 +1150,7 @@ class behat_course extends behat_base { /** * Clicks course checkbox in the management interface, if not checked. * - * @Given /^I select course "(?P[^"]*)" in the management interface$/ + * @Given /^I select course "(?P(?:[^"]|\\")*)" in the management interface$/ * @param string $name */ public function i_select_course_in_the_management_interface($name) { @@ -1164,7 +1164,7 @@ class behat_course extends behat_base { /** * Clicks course checkbox in the management interface, if checked. * - * @Given /^I unselect course "(?P[^"]*)" in the management interface$/ + * @Given /^I unselect course "(?P(?:[^"]|\\")*)" in the management interface$/ * @param string $name */ public function i_unselect_course_in_the_management_interface($name) { @@ -1178,7 +1178,7 @@ class behat_course extends behat_base { /** * Move selected categories to top level in the management interface. * - * @Given /^I move category "(?P[^"]*)" to top level in the management interface$/ + * @Given /^I move category "(?P(?:[^"]|\\")*)" to top level in the management interface$/ * @param string $name * @return Given[] */ @@ -1193,7 +1193,7 @@ class behat_course extends behat_base { /** * Checks that a category is a subcategory of specific category. * - * @Given /^I should see category "(?P[^"]*)" as subcategory of "(?P[^"]*)" in the management interface$/ + * @Given /^I should see category "(?P(?:[^"]|\\")*)" as subcategory of "(?P(?:[^"]|\\")*)" in the management interface$/ * @throws ExpectationException * @param string $subcatidnumber * @param string $catidnumber @@ -1209,7 +1209,7 @@ class behat_course extends behat_base { /** * Checks that a category is not a subcategory of specific category. * - * @Given /^I should not see category "(?P[^"]*)" as subcategory of "(?P[^"]*)" in the management interface$/ + * @Given /^I should not see category "(?P(?:[^"]|\\")*)" as subcategory of "(?P(?:[^"]|\\")*)" in the management interface$/ * @throws ExpectationException * @param string $subcatidnumber * @param string $catidnumber @@ -1227,7 +1227,7 @@ class behat_course extends behat_base { /** * Click to expand a category revealing its sub categories within the management UI. * - * @Given /^I click to expand category "(?P[^"]*)" in the management interface$/ + * @Given /^I click to expand category "(?P(?:[^"]|\\")*)" in the management interface$/ * @param string $idnumber */ public function i_click_to_expand_category_in_the_management_interface($idnumber) { @@ -1240,7 +1240,7 @@ class behat_course extends behat_base { /** * Checks that a category within the management interface is visible. * - * @Given /^category in management listing should be visible "(?P[^"]*)"$/ + * @Given /^category in management listing should be visible "(?P(?:[^"]|\\")*)"$/ * @param string $idnumber */ public function category_in_management_listing_should_be_visible($idnumber) { @@ -1253,7 +1253,7 @@ class behat_course extends behat_base { /** * Checks that a category within the management interface is dimmed. * - * @Given /^category in management listing should be dimmed "(?P[^"]*)"$/ + * @Given /^category in management listing should be dimmed "(?P(?:[^"]|\\")*)"$/ * @param string $idnumber */ public function category_in_management_listing_should_be_dimmed($idnumber) { @@ -1266,7 +1266,7 @@ class behat_course extends behat_base { /** * Checks that a course within the management interface is visible. * - * @Given /^course in management listing should be visible "(?P[^"]*)"$/ + * @Given /^course in management listing should be visible "(?P(?:[^"]|\\")*)"$/ * @param string $idnumber */ public function course_in_management_listing_should_be_visible($idnumber) { @@ -1279,7 +1279,7 @@ class behat_course extends behat_base { /** * Checks that a course within the management interface is dimmed. * - * @Given /^course in management listing should be dimmed "(?P[^"]*)"$/ + * @Given /^course in management listing should be dimmed "(?P(?:[^"]|\\")*)"$/ * @param string $idnumber */ public function course_in_management_listing_should_be_dimmed($idnumber) { @@ -1294,7 +1294,7 @@ class behat_course extends behat_base { * * If it was visible it will be hidden. If it is hidden it will be made visible. * - * @Given /^I toggle visibility of course "(?P[^"]*)" in management listing$/ + * @Given /^I toggle visibility of course "(?P(?:[^"]|\\")*)" in management listing$/ * @param string $idnumber */ public function i_toggle_visibility_of_course_in_management_listing($idnumber) { @@ -1315,7 +1315,7 @@ class behat_course extends behat_base { * * If it was visible it will be hidden. If it is hidden it will be made visible. * - * @Given /^I toggle visibility of category "(?P[^"]*)" in management listing$/ + * @Given /^I toggle visibility of category "(?P(?:[^"]|\\")*)" in management listing$/ */ public function i_toggle_visibility_of_category_in_management_listing($idnumber) { $id = $this->get_category_id($idnumber); @@ -1333,7 +1333,7 @@ class behat_course extends behat_base { /** * Moves a category displayed in the management interface up or down one place. * - * @Given /^I click to move category "(?P[^"]*)" (?Pup|down) one$/ + * @Given /^I click to move category "(?P(?:[^"]|\\")*)" (?Pup|down) one$/ * * @param string $idnumber The category idnumber * @param string $direction The direction to move in, either up or down @@ -1346,7 +1346,7 @@ class behat_course extends behat_base { /** * Moves a course displayed in the management interface up or down one place. * - * @Given /^I click to move course "(?P[^"]*)" (?Pup|down) one$/ + * @Given /^I click to move course "(?P(?:[^"]|\\")*)" (?Pup|down) one$/ * * @param string $idnumber The course idnumber * @param string $direction The direction to move in, either up or down @@ -1396,7 +1396,7 @@ class behat_course extends behat_base { /** * Check that one course appears before another in the course category management listings. * - * @Given /^I should see course listing "(?P[^"]*)" before "(?P[^"]*)"$/ + * @Given /^I should see course listing "(?P(?:[^"]|\\")*)" before "(?P(?:[^"]|\\")*)"$/ * * @param string $preceedingcourse The first course to find * @param string $followingcourse The second course to find (should be AFTER the first course) @@ -1413,7 +1413,7 @@ class behat_course extends behat_base { /** * Check that one category appears before another in the course category management listings. * - * @Given /^I should see category listing "(?P[^"]*)" before "(?P[^"]*)"$/ + * @Given /^I should see category listing "(?P(?:[^"]|\\")*)" before "(?P(?:[^"]|\\")*)"$/ * * @param string $preceedingcategory The first category to find * @param string $followingcategory The second category to find (should be after the first category) @@ -1430,7 +1430,7 @@ class behat_course extends behat_base { /** * Checks that we are on the course management page that we expect to be on and that no course has been selected. * - * @Given /^I should see the "(?P[^"]*)" management page$/ + * @Given /^I should see the "(?P(?:[^"]|\\")*)" management page$/ * @param string $mode The mode to expected. One of 'Courses', 'Course categories' or 'Course categories and courses' * @return Given[] */ @@ -1460,7 +1460,7 @@ class behat_course extends behat_base { /** * Checks that we are on the course management page that we expect to be on and that a course has been selected. * - * @Given /^I should see the "(?P[^"]*)" management page with a course selected$/ + * @Given /^I should see the "(?P(?:[^"]|\\")*)" management page with a course selected$/ * @param string $mode The mode to expected. One of 'Courses', 'Course categories' or 'Course categories and courses' * @return Given[] */ @@ -1474,7 +1474,7 @@ class behat_course extends behat_base { /** * Locates a course in the course category management interface and then triggers an action for it. * - * @Given /^I click on "(?P[^"]*)" action for "(?P[^"]*)" in management course listing$/ + * @Given /^I click on "(?P(?:[^"]|\\")*)" action for "(?P(?:[^"]|\\")*)" in management course listing$/ * * @param string $action The action to take. One of * @param string $name The name of the course as it is displayed in the management interface. @@ -1487,7 +1487,7 @@ class behat_course extends behat_base { /** * Locates a category in the course category management interface and then triggers an action for it. * - * @Given /^I click on "(?P[^"]*)" action for "(?P[^"]*)" in management category listing$/ + * @Given /^I click on "(?P(?:[^"]|\\")*)" action for "(?P(?:[^"]|\\")*)" in management category listing$/ * * @param string $action The action to take. One of * @param string $name The name of the category as it is displayed in the management interface. @@ -1548,7 +1548,7 @@ class behat_course extends behat_base { /** * Clicks on a category in the management interface. * - * @Given /^I click on "([^"]*)" category in the management category listing$/ + * @Given /^I click on "(?P(?:[^"]|\\")*)" category in the management category listing$/ * @param string $name The name of the category to click. */ public function i_click_on_category_in_the_management_category_listing($name) {