@@ -120,20 +120,21 @@ public function i_add_a_moodleoverflow_discussion_with_posts_from_different_user
120
120
/**
121
121
* Logs in as a user and navigates in a course to dedicated moodleoverflow discussion.
122
122
*
123
- * @Given /^I navigate as "(?P<username>[^"]*)" to "(?P<coursefullname>[^"]*)" "(?P<moodleoverflowname>[^"]*)" "(?P<discussionname>[^"]*)"$/
124
- * @param string $username The username to log in as
125
- * @param string $coursefullname The full name of the course
126
- * @param string $moodleoverflowname The name of the moodleoverflow activity
127
- * @param string $discussionname The name of the discussion
123
+ * @Given /^I navigate as "(?P<user>[^"]*)" to "(?P<course>[^"]*)" "(?P<moodleoverflow>[^"]*)" "(?P<discussion>[^"]*)"$/
124
+ *
125
+ * @param string $user The username to log in as
126
+ * @param string $course The full name of the course
127
+ * @param string $moodleoverflow The name of the moodleoverflow activity
128
+ * @param string $discussion The name of the discussion
128
129
* @return void
129
130
* @throws Exception
130
131
*/
131
- public function i_navigate_as_user_to_the_discussion (string $ username , string $ coursefullname , string $ moodleoverflowname ,
132
- string $ discussionname ): void {
133
- $ this ->execute ('behat_auth::i_log_in_as ' , $ username );
134
- $ this ->execute ('behat_navigation::i_am_on_course_homepage ' , $ coursefullname );
135
- $ this ->execute ('behat_general::click_link ' , $ this ->escape ($ moodleoverflowname ));
136
- $ this ->execute ('behat_general::click_link ' , $ this ->escape ($ discussionname ));
132
+ public function i_navigate_as_user_to_the_discussion (string $ user , string $ course , string $ moodleoverflow ,
133
+ string $ discussion ): void {
134
+ $ this ->execute ('behat_auth::i_log_in_as ' , $ user );
135
+ $ this ->execute ('behat_navigation::i_am_on_course_homepage ' , $ course );
136
+ $ this ->execute ('behat_general::click_link ' , $ this ->escape ($ moodleoverflow ));
137
+ $ this ->execute ('behat_general::click_link ' , $ this ->escape ($ discussion ));
137
138
}
138
139
139
140
/**
@@ -148,7 +149,7 @@ public function i_try_to_delete_moodleoverflow_post(string $postmessage): void {
148
149
// Find the div containing the post message and click the delete link within it.
149
150
$ this ->execute ('behat_general::i_click_on ' , [
150
151
"//div[contains(@class, 'moodleoverflowpost')][contains(., ' " . $ this ->escape ($ postmessage ) . "')]//a[text()='Delete'] " ,
151
- "xpath_element "
152
+ "xpath_element " ,
152
153
]);
153
154
$ this ->execute ('behat_general::i_click_on ' , ['Continue ' , 'button ' ]);
154
155
}
@@ -164,8 +165,9 @@ public function i_try_to_delete_moodleoverflow_post(string $postmessage): void {
164
165
*/
165
166
public function i_comment_moodleoverflow_post_with_message (string $ postmessage , string $ replymessage ): void {
166
167
$ this ->execute ('behat_general::i_click_on ' , [
167
- "//div[contains(@class, 'moodleoverflowpost')][contains(., ' " . $ this ->escape ($ postmessage ) . "')]//a[text()='Comment'] " ,
168
- "xpath_element "
168
+ "//div[contains(@class, 'moodleoverflowpost')][contains(., ' " . $ this ->escape ($ postmessage ) .
169
+ "')]//a[text()='Comment'] " ,
170
+ "xpath_element " ,
169
171
]);
170
172
$ table = new TableNode ([
171
173
['Message ' , $ replymessage ],
0 commit comments