aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/tests
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/tests')
-rw-r--r--apps/dav/tests/unit/CalDAV/WebcalCaching/ConnectionTest.php27
1 files changed, 7 insertions, 20 deletions
diff --git a/apps/dav/tests/unit/CalDAV/WebcalCaching/ConnectionTest.php b/apps/dav/tests/unit/CalDAV/WebcalCaching/ConnectionTest.php
index 0d836e44949..5e9caaaeb44 100644
--- a/apps/dav/tests/unit/CalDAV/WebcalCaching/ConnectionTest.php
+++ b/apps/dav/tests/unit/CalDAV/WebcalCaching/ConnectionTest.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
*/
namespace OCA\DAV\Tests\unit\CalDAV\WebcalCaching;
-use GuzzleHttp\HandlerStack;
use OCA\DAV\CalDAV\WebcalCaching\Connection;
use OCP\Http\Client\IClient;
use OCP\Http\Client\IClientService;
@@ -48,7 +47,6 @@ class ConnectionTest extends TestCase {
'source' => $source,
'lastmodified' => 0,
];
- $mutation = [];
$client = $this->createMock(IClient::class);
$this->clientService->expects(self::once())
@@ -69,7 +67,7 @@ class ConnectionTest extends TestCase {
->method('warning')
->with('Subscription 42 was not refreshed because it violates local access rules', ['exception' => $localServerException]);
- $this->connection->queryWebcalFeed($subscription, $mutation);
+ $this->connection->queryWebcalFeed($subscription);
}
public function testInvalidUrl(): void {
@@ -83,22 +81,14 @@ class ConnectionTest extends TestCase {
'source' => '!@#$',
'lastmodified' => 0,
];
- $mutation = [];
$client = $this->createMock(IClient::class);
- $this->clientService->expects(self::once())
- ->method('newClient')
- ->with()
- ->willReturn($client);
- $this->config->expects(self::once())
- ->method('getValueString')
- ->with('dav', 'webcalAllowLocalAccess', 'no')
- ->willReturn('no');
-
+ $this->config->expects(self::never())
+ ->method('getValueString');
$client->expects(self::never())
->method('get');
- $this->connection->queryWebcalFeed($subscription, $mutation);
+ $this->connection->queryWebcalFeed($subscription);
}
@@ -120,7 +110,6 @@ class ConnectionTest extends TestCase {
'source' => $url,
'lastmodified' => 0,
];
- $mutation = [];
$this->clientService->expects($this->once())
->method('newClient')
@@ -134,9 +123,7 @@ class ConnectionTest extends TestCase {
$client->expects($this->once())
->method('get')
- ->with('https://foo.bar/bla2', $this->callback(function ($obj) {
- return $obj['allow_redirects']['redirects'] === 10 && $obj['handler'] instanceof HandlerStack;
- }))
+ ->with('https://foo.bar/bla2')
->willReturn($response);
$response->expects($this->once())
@@ -148,9 +135,9 @@ class ConnectionTest extends TestCase {
->with('Content-Type')
->willReturn($contentType);
- $this->connection->queryWebcalFeed($subscription, $mutation);
-
+ $this->connection->queryWebcalFeed($subscription);
}
+
public static function runLocalURLDataProvider(): array {
return [
['localhost/foo.bar'],