/** * mainImage() should give the product's first image. */ public function testMainImageIsFirstImage() { $images = new Collection(['foo image', 'bar image']); $this->mockModelAttribute('images', $images); $this->assertSame($images[0], $this->productPresenter->mainImage()); }