forked from CollaboraOnline/collabora-drupal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue CollaboraOnline#56: TMP: Add FetchClientUrlTestDISABLED.
- Loading branch information
1 parent
712d8e2
commit c3bc0e8
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()); | ||
} | ||
|
||
} |