1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-09 02:06:32 +02:00

[ticket/develop/11568] Do not directly access $client from tests

PHPBB3-11568
This commit is contained in:
Joas Schilling
2013-05-28 14:55:04 +02:00
parent 6d9888be65
commit 467c4d62c4
6 changed files with 13 additions and 17 deletions

View File

@@ -28,7 +28,7 @@ class phpbb_functional_acp_permissions_test extends phpbb_functional_test_case
$crawler = $this->request('GET', 'adm/index.php?i=16&sid=' . $this->sid);
$this->assert_response_success();
// these language strings are html
$this->assertContains($this->lang('ACP_PERMISSIONS_EXPLAIN'), $this->client->getResponse()->getContent());
$this->assertContains($this->lang('ACP_PERMISSIONS_EXPLAIN'), $this->get_content());
}
public function test_select_user()
@@ -36,13 +36,13 @@ class phpbb_functional_acp_permissions_test extends phpbb_functional_test_case
// User permissions
$crawler = $this->request('GET', 'adm/index.php?i=acp_permissions&icat=16&mode=setting_user_global&sid=' . $this->sid);
$this->assert_response_success();
$this->assertContains($this->lang('ACP_USERS_PERMISSIONS_EXPLAIN'), $this->client->getResponse()->getContent());
$this->assertContains($this->lang('ACP_USERS_PERMISSIONS_EXPLAIN'), $this->get_content());
// Select admin
$form = $crawler->selectButton($this->lang('SUBMIT'))->form();
$data = array('username[0]' => 'admin');
$form->setValues($data);
$crawler = $this->client->submit($form);
$crawler = $this->submit($form);
$this->assert_response_success();
$this->assertContains($this->lang('ACL_SET'), $crawler->filter('h1')->eq(1)->text());
}
@@ -114,7 +114,7 @@ class phpbb_functional_acp_permissions_test extends phpbb_functional_test_case
// set to never
$data = array("setting[$object_id][0][$permission]" => '0');
$form->setValues($data);
$crawler = $this->client->submit($form);
$crawler = $this->submit($form);
$this->assert_response_success();
$this->assertContains($this->lang('AUTH_UPDATED'), $crawler->text());