summaryrefslogtreecommitdiffstats
path: root/apps/oauth2/tests/Controller/SettingsControllerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/oauth2/tests/Controller/SettingsControllerTest.php')
-rw-r--r--apps/oauth2/tests/Controller/SettingsControllerTest.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/apps/oauth2/tests/Controller/SettingsControllerTest.php b/apps/oauth2/tests/Controller/SettingsControllerTest.php
index 4954d379f9d..216655190ae 100644
--- a/apps/oauth2/tests/Controller/SettingsControllerTest.php
+++ b/apps/oauth2/tests/Controller/SettingsControllerTest.php
@@ -72,15 +72,12 @@ class SettingsControllerTest extends TestCase {
public function testAddClient() {
$this->secureRandom
- ->expects($this->at(0))
+ ->expects($this->exactly(2))
->method('generate')
->with(64, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789')
- ->willReturn('MySecret');
- $this->secureRandom
- ->expects($this->at(1))
- ->method('generate')
- ->with(64, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789')
- ->willReturn('MyClientIdentifier');
+ ->willReturnOnConsecutiveCalls(
+ 'MySecret',
+ 'MyClientIdentifier');
$client = new Client();
$client->setName('My Client Name');