mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/14962] Fix functional test for editing post
PHPBB3-14962
This commit is contained in:
parent
f82299b8e4
commit
538f03efb0
1 changed files with 6 additions and 3 deletions
|
@ -92,13 +92,16 @@ class phpbb_functional_posting_test extends phpbb_functional_test_case
|
||||||
public function test_edit()
|
public function test_edit()
|
||||||
{
|
{
|
||||||
$this->login();
|
$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();
|
$url = self::$client->getCrawler()->selectLink('Edit')->link()->getUri();
|
||||||
$post_id = $this->get_parameter_from_link($url, 'p');
|
$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());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue