Skip to content

Commit f7eb446

Browse files
committed
Remove default value for $action in getWopiClientURL.
1 parent 6ba234d commit f7eb446

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/Discovery/Discovery.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct(
3232
/**
3333
* {@inheritdoc}
3434
*/
35-
public function getWopiClientURL(string $action = 'view', string $mimetype = 'text/plain'): ?string {
35+
public function getWopiClientURL(string $action, string $mimetype = 'text/plain'): ?string {
3636
$result = $this->parsedXml->xpath(sprintf(
3737
"/wopi-discovery/net-zone/app[@name='%s']/action[@name='%s']",
3838
$mimetype,

src/Discovery/DiscoveryInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ interface DiscoveryInterface {
3333
* The WOPI client URL, or NULL if none provided for the MIME type and
3434
* operation.
3535
*/
36-
public function getWopiClientURL(string $action = 'view', string $mimetype = 'text/plain'): ?string;
36+
public function getWopiClientURL(string $action, string $mimetype = 'text/plain'): ?string;
3737

3838
/**
3939
* Gets the public key used for proofing.

tests/src/ExistingSite/FetchClientUrlTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function testFetchClientUrl(): void {
4141
/** @var \Drupal\collabora_online\Discovery\DiscoveryFetcherInterface $discovery_fetcher */
4242
$discovery_fetcher = \Drupal::service(DiscoveryFetcherInterface::class);
4343
$discovery = $discovery_fetcher->getDiscovery();
44-
$client_url = $discovery->getWopiClientURL();
44+
$client_url = $discovery->getWopiClientURL('view');
4545
$this->assertNotNull($client_url);
4646
// The protocol, domain and port are known when this test runs in the
4747
// docker-compose setup.

tests/src/Kernel/DiscoveryFetcherTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public function testGetDiscovery(): void {
117117
$discovery = $fetcher->getDiscovery();
118118
$this->assertSame(
119119
'http://collabora.test:9980/browser/61cf2b4/cool.html?',
120-
$discovery->getWopiClientURL(),
120+
$discovery->getWopiClientURL('view'),
121121
);
122122
$this->assertSame(
123123
[

tests/src/Unit/CollaboraDiscoveryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function testWopiClientUrl(): void {
2525
$discovery = $this->getDiscoveryFromFile($file);
2626
$this->assertSame(
2727
'http://collabora.test:9980/browser/61cf2b4/cool.html?',
28-
$discovery->getWopiClientURL(),
28+
$discovery->getWopiClientURL('view'),
2929
);
3030
$this->assertSame(
3131
'http://spreadsheet.collabora.test:9980/browser/61cf2b4/cool.html?',

0 commit comments

Comments
 (0)