aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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());
}
/**