Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Collaboration/Resources/ProviderManagerTest.php')
-rw-r--r--tests/lib/Collaboration/Resources/ProviderManagerTest.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/lib/Collaboration/Resources/ProviderManagerTest.php b/tests/lib/Collaboration/Resources/ProviderManagerTest.php
index 01e45de9fdf..8f408418409 100644
--- a/tests/lib/Collaboration/Resources/ProviderManagerTest.php
+++ b/tests/lib/Collaboration/Resources/ProviderManagerTest.php
@@ -91,14 +91,15 @@ class ProviderManagerTest extends TestCase {
}
public function testGetResourceProvidersValidAndInvalidProvider(): void {
- $this->serverContainer->expects($this->at(0))
+ $this->serverContainer->expects($this->exactly(2))
->method('query')
- ->with($this->equalTo('InvalidResourceProvider'))
- ->willThrowException(new QueryException('A meaningful error message'));
- $this->serverContainer->expects($this->at(1))
- ->method('query')
- ->with($this->equalTo(ResourceProvider::class))
- ->willReturn($this->createMock(ResourceProvider::class));
+ ->withConsecutive(
+ [$this->equalTo('InvalidResourceProvider')],
+ [$this->equalTo(ResourceProvider::class)],
+ )->willReturnOnConsecutiveCalls(
+ $this->throwException(new QueryException('A meaningful error message')),
+ $this->createMock(ResourceProvider::class),
+ );
$this->logger->expects($this->once())
->method('error');