public function test_canAddGallery() { $product = new Simple(clone $this->simpleRequiredData); $image = new Images(); $image->addImageToGallery('gallery1.jpg', 'gallery1')->addImageToGallery('gallery2.jpg', 'gallery2')->addImageToGallery('gallery3.jpg', 'gallery3'); $product->injectData($image); $data = $product->getData(); $this->assertEquals('gallery1.jpg::gallery1;gallery2.jpg::gallery2;gallery3.jpg::gallery3', $data['gallery']); }
public function test_noCategoryAdded() { $product = new Simple(clone $this->simpleRequiredData); $category = new Category(); $product->injectData($category); $data = $product->getData(); $this->assertFalse(isset($data['categories'])); }