aboutsummaryrefslogtreecommitdiff
path: root/tests/Environments
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Environments')
-rw-r--r--tests/Environments/ServiceEnvironmentTest.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/Environments/ServiceEnvironmentTest.php b/tests/Environments/ServiceEnvironmentTest.php
index faa38da..792fcd1 100644
--- a/tests/Environments/ServiceEnvironmentTest.php
+++ b/tests/Environments/ServiceEnvironmentTest.php
@@ -29,13 +29,17 @@ use PHPUnit\Framework\TestCase;
* @package Tests\Environments
*/
final class ServiceEnvironmentTest extends TestCase {
- public function testGetUrl(): void {
+ public function testGetUrlWithMethod(): void {
$key = Faker::create()->sha256;
$method = Faker::create()->sha256;
-
- $url = ServiceEnvironment::getUrl($key, $method);
-
+ $url = ServiceEnvironment::create($key)->getUrl($method);
self::assertStringContainsString($key, $url);
self::assertStringContainsString($method, $url);
}
+
+ public function testGetUrlWithoutMethod(): void {
+ $key = Faker::create()->sha256;
+ $url = ServiceEnvironment::create($key)->getUrl();
+ self::assertStringContainsString($key, $url);
+ }
}