summaryrefslogtreecommitdiffstats
path: root/tests/php/Settings/Admin/AdminSettingsTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/php/Settings/Admin/AdminSettingsTest.php')
-rw-r--r--tests/php/Settings/Admin/AdminSettingsTest.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/php/Settings/Admin/AdminSettingsTest.php b/tests/php/Settings/Admin/AdminSettingsTest.php
index 71ae4569f..c5c13a02d 100644
--- a/tests/php/Settings/Admin/AdminSettingsTest.php
+++ b/tests/php/Settings/Admin/AdminSettingsTest.php
@@ -34,6 +34,7 @@ use OCP\IGroupManager;
use OCP\IL10N;
use OCP\IUserSession;
use OCP\L10N\IFactory;
+use PHPUnit\Framework\Assert;
use PHPUnit\Framework\MockObject\MockObject;
use Test\TestCase;
@@ -165,12 +166,18 @@ class AdminSettingsTest extends TestCase {
->with('has_internet_connection', true)
->willReturn(true);
+ $i = 0;
+ $expectedCalls = [
+ ['stun_servers', ['getStunServers']],
+ ['has_internet_connection', true],
+ ];
$this->initialState->expects($this->exactly(2))
->method('provideInitialState')
- ->withConsecutive(
- ['stun_servers', ['getStunServers']],
- ['has_internet_connection', true]
- );
+ ->willReturnCallback(function () use ($expectedCalls, &$i) {
+ Assert::assertArrayHasKey($i, $expectedCalls);
+ Assert::assertSame($expectedCalls[$i], func_get_args());
+ $i++;
+ });
$admin = $this->getAdminSettings();
self::invokePrivate($admin, 'initStunServers');