Skip to content
This repository has been archived by the owner on Jun 2, 2020. It is now read-only.

Commit

Permalink
Programmes 6620 media types on parents (#13)
Browse files Browse the repository at this point in the history
* Put media type on parent info in find-by-pid feeds and pray shit doesn't explode
  • Loading branch information
BjornTwachtmann authored Sep 13, 2018
1 parent 356d200 commit f8cdcb8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ApsMapper/FindByPidProgrammeMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions tests/ApsMapper/FindByPidProgrammeMapperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down Expand Up @@ -772,6 +773,7 @@ public function testMappingParents()
],
],
'aggregated_episode_count' => 0,
'media_type' => null,
],
];

Expand All @@ -795,6 +797,7 @@ public function testMappingParents()
],
'parent' => $expectedBrand,
'aggregated_episode_count' => 0,
'media_type' => null,
],
];

Expand Down

0 comments on commit f8cdcb8

Please sign in to comment.