diff --git a/src/ApsMapper/FindByPidProgrammeMapper.php b/src/ApsMapper/FindByPidProgrammeMapper.php index 3de5984..cdc9ab8 100644 --- a/src/ApsMapper/FindByPidProgrammeMapper.php +++ b/src/ApsMapper/FindByPidProgrammeMapper.php @@ -95,6 +95,7 @@ private function getParent(Programme $programme) 'title' => $this->getProgrammeTitle($programme->getTitle()), // Only synopses at the top level coerce empty strings to null 'short_synopsis' => $programme->getShortSynopsis(), + 'media_type' => $this->getMediaType($programme), 'position' => $programme->getPosition(), 'image' => $this->getImageObject($programme->getImage()), 'expected_child_count' => ($programme instanceof ProgrammeContainer) ? $programme->getExpectedChildCount() : null, diff --git a/tests/ApsMapper/FindByPidProgrammeMapperTest.php b/tests/ApsMapper/FindByPidProgrammeMapperTest.php index fa34a86..f0ad99b 100644 --- a/tests/ApsMapper/FindByPidProgrammeMapperTest.php +++ b/tests/ApsMapper/FindByPidProgrammeMapperTest.php @@ -172,6 +172,7 @@ public function testMappingSeries() 'short_synopsis' => 'Short Synopsis', 'first_broadcast_date' => '2000-01-01T00:00:00Z', 'aggregated_episode_count' => 1202, + 'media_type' => null, ], ], 'peers' => (object) ['previous' => null, 'next' => null], @@ -772,6 +773,7 @@ public function testMappingParents() ], ], 'aggregated_episode_count' => 0, + 'media_type' => null, ], ]; @@ -795,6 +797,7 @@ public function testMappingParents() ], 'parent' => $expectedBrand, 'aggregated_episode_count' => 0, + 'media_type' => null, ], ];