mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/16825] Adjust functional tests for modified sid handling
PHPBB3-16825
This commit is contained in:
parent
03ec6ce0a9
commit
217fc07036
5 changed files with 15 additions and 20 deletions
|
@ -60,12 +60,7 @@ class phpbb_functional_auth_test extends phpbb_functional_test_case
|
|||
$this->login();
|
||||
$this->add_lang('ucp');
|
||||
|
||||
// logout
|
||||
$crawler = self::request('GET', 'ucp.php?sid=' . $this->sid . '&mode=logout');
|
||||
|
||||
// look for a register link, which should be visible only when logged out
|
||||
$crawler = self::request('GET', 'index.php');
|
||||
$this->assertStringContainsString($this->lang('REGISTER'), $crawler->filter('.navbar')->text());
|
||||
$this->logout();
|
||||
}
|
||||
|
||||
public function test_acp_login()
|
||||
|
|
|
@ -46,6 +46,7 @@ class phpbb_functional_mcp_test extends phpbb_functional_test_case
|
|||
public function test_move_post_to_topic($crawler)
|
||||
{
|
||||
$this->login();
|
||||
$this->add_lang('mcp');
|
||||
|
||||
// Select the post in MCP
|
||||
$form = $crawler->selectButton($this->lang('SUBMIT'))->form(array(
|
||||
|
@ -55,18 +56,11 @@ class phpbb_functional_mcp_test extends phpbb_functional_test_case
|
|||
$crawler = self::submit($form);
|
||||
$this->assertStringContainsString($this->lang('MERGE_POSTS'), $crawler->filter('html')->text());
|
||||
|
||||
return $crawler;
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends test_move_post_to_topic
|
||||
*/
|
||||
public function test_confirm_result($crawler)
|
||||
{
|
||||
$this->add_lang('mcp');
|
||||
$form = $crawler->selectButton('Yes')->form();
|
||||
$crawler = self::submit($form);
|
||||
$this->assertStringContainsString($this->lang('POSTS_MERGED_SUCCESS'), $crawler->text());
|
||||
|
||||
return $crawler;
|
||||
}
|
||||
|
||||
public function test_delete_logs()
|
||||
|
|
|
@ -64,8 +64,8 @@ class phpbb_functional_report_post_captcha_test extends phpbb_functional_test_ca
|
|||
$values = $form->getValues();
|
||||
$values["setting[1][2][f_report]"] = $report_post_allowed;
|
||||
$form->setValues($values);
|
||||
$crawler = self::submit($form);
|
||||
self::submit($form);
|
||||
|
||||
$crawler = self::request('GET', 'ucp.php?mode=logout&sid=' . $this->sid);
|
||||
$this->logout();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -89,7 +89,10 @@ class phpbb_functional_ucp_profile_test extends phpbb_functional_test_case
|
|||
$this->assertStringContainsString($key_id, $crawler->filter('label[for="' . $key_id . '"]')->text());
|
||||
|
||||
$form = $crawler->selectButton('submit')->form();
|
||||
$form['keys'][0]->tick();
|
||||
foreach ($form['keys'] as $key)
|
||||
{
|
||||
$key->tick();
|
||||
}
|
||||
$crawler = self::submit($form);
|
||||
$this->assertStringContainsString($this->lang('AUTOLOGIN_SESSION_KEYS_DELETED'), $crawler->filter('html')->text());
|
||||
|
||||
|
|
|
@ -829,10 +829,13 @@ class phpbb_functional_test_case extends phpbb_test_case
|
|||
{
|
||||
$this->add_lang('ucp');
|
||||
|
||||
$crawler = self::request('GET', 'ucp.php?sid=' . $this->sid . '&mode=logout');
|
||||
$crawler = self::request('GET', 'index.php');
|
||||
$logout_link = $crawler->filter('a[title="' . $this->lang('LOGOUT') . '"]')->attr('href');
|
||||
self::request('GET', $logout_link);
|
||||
|
||||
$crawler = self::request('GET', $logout_link);
|
||||
$this->assertStringContainsString($this->lang('REGISTER'), $crawler->filter('.navbar')->text());
|
||||
unset($this->sid);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue