aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2017-01-06 23:46:34 +0100
committerMarc Alexander <admin@m-a-styles.de>2017-01-06 23:46:34 +0100
commit538f03efb058c84daf3e677a3137be8900678f2b (patch)
treed030c8ebf14caad20221d45061edb4107029bae4
parentf82299b8e445cccfc8bad8cbe6505f3fb50d0f8f (diff)
downloadforums-538f03efb058c84daf3e677a3137be8900678f2b.tar
forums-538f03efb058c84daf3e677a3137be8900678f2b.tar.gz
forums-538f03efb058c84daf3e677a3137be8900678f2b.tar.bz2
forums-538f03efb058c84daf3e677a3137be8900678f2b.tar.xz
forums-538f03efb058c84daf3e677a3137be8900678f2b.zip
[ticket/14962] Fix functional test for editing post
PHPBB3-14962
-rw-r--r--tests/functional/posting_test.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/functional/posting_test.php b/tests/functional/posting_test.php
index 4ed34eca31..83acefd2f3 100644
--- a/tests/functional/posting_test.php
+++ b/tests/functional/posting_test.php
@@ -92,13 +92,16 @@ class phpbb_functional_posting_test extends phpbb_functional_test_case
public function test_edit()
{
$this->login();
- $this->create_topic(2, 'Test Topic 1', 'Test topic');
+ $this->create_topic(2, 'Test Topic post', 'Test topic post');
$url = self::$client->getCrawler()->selectLink('Edit')->link()->getUri();
$post_id = $this->get_parameter_from_link($url, 'p');
- $this->submit_post("posting.php?mode=edit&f=2&p={$post_id}", 'EDIT_POST', array('message' => 'Edited post'));
+ $crawler = self::request('GET', "posting.php?mode=edit&f=2&p={$post_id}&sid={$this->sid}");
+ $form = $crawler->selectButton('Submit')->form();
+ $form->setValues(array('message' => 'Edited post'));
+ $crawler = self::submit($form);
- $this->assertContains('Edited post', self::$client->getCrawler()->filter("#post_content{$post_id} .content")->text());
+ $this->assertContains('Edited post', $crawler->filter("#post_content{$post_id} .content")->text());
}
/**