1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-11 19:24:01 +02:00

[ticket/16549] Rewrite at() calls

See https://github.com/sebastianbergmann/phpunit/issues/4297

PHPBB3-16549
This commit is contained in:
rxu
2020-11-14 22:21:15 +07:00
parent 72a39920c7
commit 56a7d74588
6 changed files with 100 additions and 148 deletions

View File

@@ -72,14 +72,10 @@ class phpbb_auth_provider_apache_test extends phpbb_database_test_case
->with('PHP_AUTH_USER',
\phpbb\request\request_interface::SERVER)
->will($this->returnValue(true));
$this->request->expects($this->at(1))
$this->request->expects($this->exactly(2))
->method('server')
->with('PHP_AUTH_USER')
->will($this->returnValue('foobar'));
$this->request->expects($this->at(2))
->method('server')
->with('PHP_AUTH_PW')
->will($this->returnValue('example'));
->withConsecutive(['PHP_AUTH_USER'], ['PHP_AUTH_PW'])
->will($this->onConsecutiveCalls($this->returnValue('foobar'), $this->returnValue('example')));
$expected = array(
'status' => LOGIN_SUCCESS,
@@ -104,14 +100,10 @@ class phpbb_auth_provider_apache_test extends phpbb_database_test_case
->with('PHP_AUTH_USER',
\phpbb\request\request_interface::SERVER)
->will($this->returnValue(true));
$this->request->expects($this->at(1))
$this->request->expects($this->exactly(2))
->method('server')
->with('PHP_AUTH_USER')
->will($this->returnValue('foobar'));
$this->request->expects($this->at(2))
->method('server')
->with('PHP_AUTH_PW')
->will($this->returnValue('example'));
->withConsecutive(['PHP_AUTH_USER'], ['PHP_AUTH_PW'])
->will($this->onConsecutiveCalls($this->returnValue('foobar'), $this->returnValue('example')));
$expected = array(
'user_id' => 1,