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

Merge remote-tracking branch 'p/ticket/10758' into develop

* p/ticket/10758:
  [ticket/10758] Add return to the other compat function.
  [ticket/10758] Add periods.
  [ticket/10758] Yes, only one empty line.
  [ticket/10758] Add deprecated tags.
  [ticket/10758] Add compat functions.
  [ticket/10758] Admin is not working yet.
  [ticket/10758] Test moderator and admin permissions.
  [ticket/10758] Check that acl was changed in the test.
  [ticket/10758] Extract obtain_user_data for the benefit of tests.
  [ticket/10758] Functional test for changing a user's permission.
  [ticket/10758] Spelling fix.
  [ticket/10758] Add a test for acp login.
  [ticket/10758] Dependency inject parameters into update_foes.
  [ticket/10758] Dependency inject parameters into cache_moderators.
This commit is contained in:
Andreas Fischer
2012-12-25 15:18:47 +01:00
11 changed files with 245 additions and 50 deletions

View File

@@ -323,7 +323,7 @@ class phpbb_functional_test_case extends phpbb_test_case
* Login to the ACP
* You must run login() before calling this.
*/
protected function admin_login()
protected function admin_login($username = 'admin')
{
$this->add_lang('acp/common');
@@ -343,7 +343,9 @@ class phpbb_functional_test_case extends phpbb_test_case
{
if (strpos($field, 'password_') === 0)
{
$login = $this->client->submit($form, array('username' => 'admin', $field => 'admin'));
$crawler = $this->client->submit($form, array('username' => $username, $field => $username));
$this->assert_response_success();
$this->assertContains($this->lang('LOGIN_ADMIN_SUCCESS'), $crawler->filter('html')->text());
$cookies = $this->cookieJar->all();