From 721e01511aca0df7a8fdee421ea8d65a5879684b Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Wed, 15 Jul 2020 19:27:57 +0400 Subject: Added genre repository Signed-off-by: Valentin Popov --- tests/Repositories/GenreRepositoryTest.php | 47 ++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 tests/Repositories/GenreRepositoryTest.php (limited to 'tests/Repositories/GenreRepositoryTest.php') diff --git a/tests/Repositories/GenreRepositoryTest.php b/tests/Repositories/GenreRepositoryTest.php new file mode 100644 index 0000000..94c8a79 --- /dev/null +++ b/tests/Repositories/GenreRepositoryTest.php @@ -0,0 +1,47 @@ + + * @license http://www.apache.org/licenses/LICENSE-2.0 + * @package Tests\Repositories + */ +final class GenreRepositoryTest extends TestCase { + /** + * @throws \GuzzleHttp\Exception\GuzzleException + */ + public function testGetAction(): void { + $env = GetServiceEnvironment::get(); + + foreach (GenreRepository::create($env)->get() as $category) { + /** @var \EPGService\Entities\GenreEntity $category */ + + self::assertIsInt($category->id); + self::assertIsString($category->lang); + self::assertIsString($category->name); + self::assertIsString($category->version); + } + } +} -- cgit v1.2.3 From d54c1d65403c7694eea5c7c84b5ea0e3541d410d Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Fri, 17 Jul 2020 13:57:52 +0400 Subject: Updated test genre repository Signed-off-by: Valentin Popov --- tests/Repositories/GenreRepositoryTest.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/Repositories/GenreRepositoryTest.php') diff --git a/tests/Repositories/GenreRepositoryTest.php b/tests/Repositories/GenreRepositoryTest.php index 94c8a79..1598bbd 100644 --- a/tests/Repositories/GenreRepositoryTest.php +++ b/tests/Repositories/GenreRepositoryTest.php @@ -35,13 +35,13 @@ final class GenreRepositoryTest extends TestCase { public function testGetAction(): void { $env = GetServiceEnvironment::get(); - foreach (GenreRepository::create($env)->get() as $category) { - /** @var \EPGService\Entities\GenreEntity $category */ + foreach (GenreRepository::create($env)->get() as $genre) { + /** @var \EPGService\Entities\GenreEntity $genre */ - self::assertIsInt($category->id); - self::assertIsString($category->lang); - self::assertIsString($category->name); - self::assertIsString($category->version); + self::assertIsInt($genre->id); + self::assertIsString($genre->lang); + self::assertIsString($genre->name); + self::assertIsString($genre->version); } } } -- cgit v1.2.3 From c7bd59904658c3f3a451dd12f36dcabae161c04d Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Sat, 18 Jul 2020 16:08:00 +0400 Subject: Updated PhpDoc Signed-off-by: Valentin Popov --- tests/Repositories/CategoryRepositoryTest.php | 2 ++ tests/Repositories/ChannelRepositoryTest.php | 5 +++++ tests/Repositories/GenreRepositoryTest.php | 2 ++ 3 files changed, 9 insertions(+) (limited to 'tests/Repositories/GenreRepositoryTest.php') diff --git a/tests/Repositories/CategoryRepositoryTest.php b/tests/Repositories/CategoryRepositoryTest.php index f78f5b4..25dbdd8 100644 --- a/tests/Repositories/CategoryRepositoryTest.php +++ b/tests/Repositories/CategoryRepositoryTest.php @@ -31,6 +31,8 @@ use Tests\Utilities\GetServiceEnvironment; final class CategoryRepositoryTest extends TestCase { /** * @throws \GuzzleHttp\Exception\GuzzleException + * @throws \RuntimeException + * @throws \Exception */ public function testGetAction(): void { $env = GetServiceEnvironment::get(); diff --git a/tests/Repositories/ChannelRepositoryTest.php b/tests/Repositories/ChannelRepositoryTest.php index eea6511..b9d9116 100644 --- a/tests/Repositories/ChannelRepositoryTest.php +++ b/tests/Repositories/ChannelRepositoryTest.php @@ -30,6 +30,11 @@ use Tests\Utilities\GetServiceEnvironment; * @package Tests\Repositories */ final class ChannelRepositoryTest extends TestCase { + /** + * @throws \GuzzleHttp\Exception\GuzzleException + * @throws \RuntimeException + * @throws \Exception + */ public function testGetAction(): void { $env = GetServiceEnvironment::get(); diff --git a/tests/Repositories/GenreRepositoryTest.php b/tests/Repositories/GenreRepositoryTest.php index 1598bbd..8afe351 100644 --- a/tests/Repositories/GenreRepositoryTest.php +++ b/tests/Repositories/GenreRepositoryTest.php @@ -31,6 +31,8 @@ use Tests\Utilities\GetServiceEnvironment; final class GenreRepositoryTest extends TestCase { /** * @throws \GuzzleHttp\Exception\GuzzleException + * @throws \RuntimeException + * @throws \Exception */ public function testGetAction(): void { $env = GetServiceEnvironment::get(); -- cgit v1.2.3