Add methods to change base url

This commit is contained in:
René Preuß
2019-12-02 14:18:58 +01:00
parent 2bd19efb3c
commit 918bcd4644
7 changed files with 69 additions and 41 deletions

View File

@@ -45,7 +45,7 @@ class ApiDocumentsTest extends ApiTestCase
$expiresAt = now()->addHours(2);
$result = $this->getClient()->createDocumentDownloadUrl(1, $expiresAt);
$result = $this->getClient()->createDocumentDownloadUrl('1', $expiresAt);
$this->registerResult($result);
$this->assertTrue($result->success());

View File

@@ -18,6 +18,11 @@ abstract class ApiTestCase extends TestCase
protected function setUp(): void
{
parent::setUp();
if ($this->getBaseUrl()) {
BitinflowAccounts::setBaseUrl($this->getBaseUrl());
}
if (!$this->getClientId()) {
$this->markTestSkipped('No Client-ID given');
}
@@ -34,6 +39,11 @@ abstract class ApiTestCase extends TestCase
return $result;
}
protected function getBaseUrl()
{
return getenv('BASE_URL');
}
protected function getClientId()
{
return getenv('CLIENT_ID');