[ticket/16207] Fix tests with sid missing from URLs

PHPBB3-16207
This commit is contained in:
Marc Alexander 2021-07-17 21:31:21 +02:00
parent fe1b9d5384
commit 0cbbb79283
No known key found for this signature in database
GPG key ID: 50E0D2423696F995
3 changed files with 5 additions and 2 deletions

View file

@ -181,7 +181,6 @@ class phpbb_functional_extension_controller_test extends phpbb_functional_test_c
$row_num = str_replace('redirect_expected_', '', $redirect); $row_num = str_replace('redirect_expected_', '', $redirect);
$redirect = $crawler->filter('#redirect_' . $row_num)->text(); $redirect = $crawler->filter('#redirect_' . $row_num)->text();
$redirect = substr($redirect, 0, strpos($redirect, 'sid') - 1);
$this->assertEquals($crawler->filter('#redirect_expected_' . $row_num)->text(), $redirect); $this->assertEquals($crawler->filter('#redirect_expected_' . $row_num)->text(), $redirect);
} }

View file

@ -34,6 +34,8 @@ class phpbb_functional_mcp_test extends phpbb_functional_test_case
*/ */
public function test_handle_quickmod($crawler) public function test_handle_quickmod($crawler)
{ {
$this->login();
// Test moving a post // Test moving a post
return $this->get_quickmod_page(0, 'MERGE_POSTS', $crawler); return $this->get_quickmod_page(0, 'MERGE_POSTS', $crawler);
} }
@ -43,6 +45,8 @@ class phpbb_functional_mcp_test extends phpbb_functional_test_case
*/ */
public function test_move_post_to_topic($crawler) public function test_move_post_to_topic($crawler)
{ {
$this->login();
// Select the post in MCP // Select the post in MCP
$form = $crawler->selectButton($this->lang('SUBMIT'))->form(array( $form = $crawler->selectButton($this->lang('SUBMIT'))->form(array(
'to_topic_id' => 1, 'to_topic_id' => 1,

View file

@ -1396,7 +1396,7 @@ class phpbb_functional_test_case extends phpbb_test_case
} }
$link = $crawler->filter('#quickmod')->selectLink($this->lang($action))->link()->getUri(); $link = $crawler->filter('#quickmod')->selectLink($this->lang($action))->link()->getUri();
return self::request('GET', substr($link, strpos($link, 'mcp.'))); return self::request('GET', substr($link, strpos($link, 'mcp.')) . "&sid={$this->sid}");
} }
/** /**