Passed
Push — master ( 9d91f5...63d5b5 )
by Bukashk0zzz
13:08
created

OfferSimpleGeneratorTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 2
cbo 3
dl 0
loc 29
rs 10
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of the Bukashk0zzzYmlGenerator
5
 *
6
 * (c) Denis Golubovskiy <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Bukashk0zzz\YmlGenerator\Tests;
13
14
use Bukashk0zzz\YmlGenerator\Model\Offer\OfferSimple;
15
16
/**
17
 * Generator test
18
 */
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