diff options
author | Valentin Popov <info@valentineus.link> | 2020-07-15 13:57:48 +0300 |
---|---|---|
committer | Valentin Popov <info@valentineus.link> | 2020-07-15 13:57:48 +0300 |
commit | ecabedfa1f7a8cbba7a522ca8440b82063d04686 (patch) | |
tree | 73ae8bafff610e6de3d1b8e51d1be090a0633524 /tests/Environments/ServiceEnvironmentTest.php | |
parent | 76e8ed954e2a1c70437fb34a927d1bb1d921d3ce (diff) | |
download | php-epg-service-ecabedfa1f7a8cbba7a522ca8440b82063d04686.tar.xz php-epg-service-ecabedfa1f7a8cbba7a522ca8440b82063d04686.zip |
Updated service environment
Signed-off-by: Valentin Popov <info@valentineus.link>
Diffstat (limited to 'tests/Environments/ServiceEnvironmentTest.php')
-rw-r--r-- | tests/Environments/ServiceEnvironmentTest.php | 12 |
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); + } } |