mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/11775] Split test into multiple steps
PHPBB3-11775
This commit is contained in:
parent
a9b5e77e68
commit
63535b196d
1 changed files with 25 additions and 1 deletions
|
@ -22,12 +22,27 @@ class phpbb_functional_mcp_test extends phpbb_functional_test_case
|
||||||
$crawler = self::request('GET', "viewtopic.php?t={$post['topic_id']}&sid={$this->sid}");
|
$crawler = self::request('GET', "viewtopic.php?t={$post['topic_id']}&sid={$this->sid}");
|
||||||
$this->assertContains('Testing move post with "Move posts" option from Quick-Moderator Tools.', $crawler->filter('html')->text());
|
$this->assertContains('Testing move post with "Move posts" option from Quick-Moderator Tools.', $crawler->filter('html')->text());
|
||||||
|
|
||||||
|
return $crawler;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @depends test_post_new_topic
|
||||||
|
*/
|
||||||
|
public function test_handle_quickmod($crawler)
|
||||||
|
{
|
||||||
// Test moving a post
|
// Test moving a post
|
||||||
$this->add_lang('mcp');
|
|
||||||
$form = $crawler->selectButton('Go')->eq(1)->form();
|
$form = $crawler->selectButton('Go')->eq(1)->form();
|
||||||
$form['action']->select('merge');
|
$form['action']->select('merge');
|
||||||
$crawler = self::submit($form);
|
$crawler = self::submit($form);
|
||||||
|
|
||||||
|
return $crawler;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @depends test_handle_quickmod
|
||||||
|
*/
|
||||||
|
public function test_move_post_to_topic($crawler)
|
||||||
|
{
|
||||||
// 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,
|
||||||
|
@ -36,6 +51,15 @@ class phpbb_functional_mcp_test extends phpbb_functional_test_case
|
||||||
$crawler = self::submit($form);
|
$crawler = self::submit($form);
|
||||||
$this->assertContains($this->lang('MERGE_POSTS'), $crawler->filter('html')->text());
|
$this->assertContains($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();
|
$form = $crawler->selectButton('Yes')->form();
|
||||||
$crawler = self::submit($form);
|
$crawler = self::submit($form);
|
||||||
$this->assertContains($this->lang('POSTS_MERGED_SUCCESS'), $crawler->text());
|
$this->assertContains($this->lang('POSTS_MERGED_SUCCESS'), $crawler->text());
|
||||||
|
|
Loading…
Add table
Reference in a new issue