| 1 | <?php |
||
| 19 | class OfferSimpleGeneratorTest extends AbstractGeneratorTest |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * Test generate |
||
| 23 | */ |
||
| 24 | public function testGenerate() |
||
| 25 | { |
||
| 26 | $this->offerType = 'Simple'; |
||
| 27 | $this->runGeneratorTest(); |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * {@inheritdoc} |
||
| 32 | */ |
||
| 33 | protected function createOffer() |
||
| 34 | { |
||
| 35 | return (new OfferSimple()) |
||
| 36 | ->setName($this->faker->name) |
||
| 37 | ->setVendor($this->faker->company) |
||
| 38 | ->setVendorCode(null) |
||
| 39 | ->setPickup(true) |
||
| 40 | ->setGroupId($this->faker->numberBetween()) |
||
| 41 | ->addPicture('http://example.com/example.jpeg') |
||
| 42 | ->addBarcode($this->faker->ean13) |
||
| 43 | ->setCategoriesId([1, 2, 3]) |
||
| 44 | ->setCategoryId(999) |
||
| 45 | ; |
||
| 46 | } |
||
| 47 | } |
||
| 48 |