diff options
Diffstat (limited to 'tests/functional/acp_permissions_test.php')
-rw-r--r-- | tests/functional/acp_permissions_test.php | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/tests/functional/acp_permissions_test.php b/tests/functional/acp_permissions_test.php index f7fd44fc89..a3d272906f 100644 --- a/tests/functional/acp_permissions_test.php +++ b/tests/functional/acp_permissions_test.php @@ -25,25 +25,22 @@ class phpbb_functional_acp_permissions_test extends phpbb_functional_test_case { // Permissions tab // XXX hardcoded id - $crawler = $this->request('GET', 'adm/index.php?i=16&sid=' . $this->sid); - $this->assert_response_success(); + $crawler = self::request('GET', 'adm/index.php?i=16&sid=' . $this->sid); // 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() { // 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()); + $crawler = self::request('GET', 'adm/index.php?i=acp_permissions&icat=16&mode=setting_user_global&sid=' . $this->sid); + $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); - $this->assert_response_success(); + $crawler = self::submit($form); $this->assertContains($this->lang('ACL_SET'), $crawler->filter('h1')->eq(1)->text()); } @@ -91,8 +88,7 @@ class phpbb_functional_acp_permissions_test extends phpbb_functional_test_case public function test_change_permission($description, $permission_type, $permission, $mode, $object_name, $object_id) { // Get the form - $crawler = $this->request('GET', "adm/index.php?i=acp_permissions&icat=16&mode=$mode&${object_name}[0]=$object_id&type=$permission_type&sid=" . $this->sid); - $this->assert_response_success(); + $crawler = self::request('GET', "adm/index.php?i=acp_permissions&icat=16&mode=$mode&${object_name}[0]=$object_id&type=$permission_type&sid=" . $this->sid); $this->assertContains($this->lang('ACL_SET'), $crawler->filter('h1')->eq(1)->text()); // XXX globals for phpbb_auth, refactor it later @@ -114,8 +110,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); - $this->assert_response_success(); + $crawler = self::submit($form); $this->assertContains($this->lang('AUTH_UPDATED'), $crawler->text()); // check acl again |