aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Environments/ServiceEnvironment.php8
-rw-r--r--tests/Environments/ServiceEnvironmentTest.php10
2 files changed, 4 insertions, 14 deletions
diff --git a/src/Environments/ServiceEnvironment.php b/src/Environments/ServiceEnvironment.php
index ade87c1..004586f 100644
--- a/src/Environments/ServiceEnvironment.php
+++ b/src/Environments/ServiceEnvironment.php
@@ -28,7 +28,7 @@ class ServiceEnvironment {
/**
* @var string
*/
- protected const BASE_URL = 'http://xmldata.epgservice.ru/EPGService/hs/xmldata/%s/%s';
+ protected const BASE_URL = 'http://xmldata.epgservice.ru/EPGService/hs/xmldata/%s';
/**
* @var string
@@ -52,11 +52,9 @@ class ServiceEnvironment {
}
/**
- * @param string $method
- *
* @return string
*/
- public function getUrl(string $method = ''): string {
- return sprintf(self::BASE_URL, $this->key, $method);
+ public function getUrl(): string {
+ return sprintf(self::BASE_URL, $this->key);
}
}
diff --git a/tests/Environments/ServiceEnvironmentTest.php b/tests/Environments/ServiceEnvironmentTest.php
index 792fcd1..b14d909 100644
--- a/tests/Environments/ServiceEnvironmentTest.php
+++ b/tests/Environments/ServiceEnvironmentTest.php
@@ -29,15 +29,7 @@ use PHPUnit\Framework\TestCase;
* @package Tests\Environments
*/
final class ServiceEnvironmentTest extends TestCase {
- public function testGetUrlWithMethod(): void {
- $key = Faker::create()->sha256;
- $method = Faker::create()->sha256;
- $url = ServiceEnvironment::create($key)->getUrl($method);
- self::assertStringContainsString($key, $url);
- self::assertStringContainsString($method, $url);
- }
-
- public function testGetUrlWithoutMethod(): void {
+ public function testGetUrl(): void {
$key = Faker::create()->sha256;
$url = ServiceEnvironment::create($key)->getUrl();
self::assertStringContainsString($key, $url);