From a223adade6e734d97787f3ca486970877f08af1e Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Sat, 18 Jul 2020 15:42:17 +0400 Subject: Added program repository Signed-off-by: Valentin Popov --- tests/Repositories/ProgramRepositoryTest.php | 52 ++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 tests/Repositories/ProgramRepositoryTest.php (limited to 'tests/Repositories') diff --git a/tests/Repositories/ProgramRepositoryTest.php b/tests/Repositories/ProgramRepositoryTest.php new file mode 100644 index 0000000..f8a32d7 --- /dev/null +++ b/tests/Repositories/ProgramRepositoryTest.php @@ -0,0 +1,52 @@ + + * @license http://www.apache.org/licenses/LICENSE-2.0 + * @package Tests\Repositories + */ +final class ProgramRepositoryTest extends TestCase { + /** + * @throws \GuzzleHttp\Exception\GuzzleException + * @throws \RuntimeException + * @throws \Exception + */ + public function testGetAction(): void { + $env = GetServiceEnvironment::get(); + $channels = ChannelRepository::create($env)->get(); + $channel = array_shift($channels); + + foreach (ProgramRepository::create($env, $channel->id)->get() as $program) { + /** @var \EPGService\Entities\ProgramEntity $program */ + + self::assertNotEmpty($program->channel_id); + self::assertNotEmpty($program->start); + self::assertNotEmpty($program->stop); + self::assertNotEmpty($program->title); + } + } +} -- cgit v1.2.3