Skip to content

Commit

Permalink
Issue CollaboraOnline#56: TMP: Add FetchClientUrlTestDISABLED.
Browse files Browse the repository at this point in the history
  • Loading branch information
donquixote committed Nov 12, 2024
1 parent 712d8e2 commit c3bc0e8
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions tests/src/ExistingSite/FetchClientUrlTestDISABLED.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

declare(strict_types=1);

namespace Drupal\Tests\collabora_online\ExistingSite;

use Drupal\collabora_online\Cool\CoolRequest;
use weitzman\DrupalTestTraits\ExistingSiteBase;

/**
* Tests requests to Collabora from PHP.
*/
class FetchClientUrlTestDISABLED extends ExistingSiteBase {

/**
* Tests fetching the client url.
*/
public function testFetchClientUrl(): void {
$cool_request = new CoolRequest();
$client_url = $cool_request->getWopiClientURL();
// The protocol, domain and port are known when this test runs in the
// docker-compose setup.
$this->assertMatchesRegularExpression('@^http://collabora\.test:9980/browser/[0-9a-f]+/cool\.html\?$@', $client_url);
$this->assertSame('0: Success', $cool_request->errorString());
}

/**
* Tests error behavior when fetching client url.
*/
public function testFetchClientUrlError(): void {
$cool_request = new CoolRequest();
$client_url = $cool_request->getWopiClientURL();
// The protocol, domain and port are known when this test runs in the
// docker-compose setup.
$this->assertMatchesRegularExpression('@^http://collabora\.test:9980/browser/[0-9a-f]+/cool\.html\?$@', $client_url);
$this->assertSame('0: Success', $cool_request->errorString());
}

}

0 comments on commit c3bc0e8

Please sign in to comment.