public function testFetchMissingSubdefinitionReturnsDefaultThumbnail()
 {
     $definitionMap = new DefinitionMap(['low' => 'missing_subdef']);
     $thumbHelper = new ThumbHelper($definitionMap);
     $thumbnail = new Subdef();
     $mySubdef = new Subdef();
     $record = new Record();
     $record->setThumbnail($thumbnail);
     $record->setSubdefs(new ArrayCollection(['my_subdef' => $mySubdef]));
     $this->assertSame($thumbnail, $thumbHelper->fetch($record, 'low'));
 }
 public function testFetchMissingSubdefinitionReturnsDefaultThumbnail()
 {
     $definitionMap = new DefinitionMap(['low' => 'missing_subdef']);
     $thumbHelper = new ThumbHelper($definitionMap);
     $thumbnail = new Subdef(new \stdClass());
     $mySubdef = new Subdef(new \stdClass());
     $record = $this->prophesize('PhraseanetSDK\\Entity\\Record');
     $record->getThumbnail()->willReturn($thumbnail);
     $record->getSubdefs()->willReturn(new ArrayCollection(['my_subdef' => $mySubdef]));
     $this->assertSame($thumbnail, $thumbHelper->fetch($record->reveal(), 'low'));
 }