Completed
Push — master ( b73efb...175f05 )
by Bukashk0zzz
03:39
created

OfferBookGeneratorTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 2
cbo 3
dl 0
loc 32
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testGenerate() 0 5 1
A createOffer() 0 17 1
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\OfferBook;
15
16
/**
17
 * Generator test
18
 *
19
 * @author Denis Golubovskiy <[email protected]>
20
 */
21
class OfferBookGeneratorTest extends AbstractGeneratorTest
22
{
23
    /**
24
     * Test generate
25
     */
26
    public function testGenerate()
27
    {
28
        $this->offerType = 'Book';
29
        $this->runGeneratorTest();
30
    }
31
32
    /**
33
     * {@inheritdoc}
34
     */
35
    protected function createOffer()
36
    {
37
        return (new OfferBook())
38
            ->setAuthor($this->faker->name)
39
            ->setName($this->faker->name)
40
            ->setPublisher($this->faker->name)
41
            ->setSeries($this->faker->name)
42
            ->setYear($this->faker->numberBetween(1, 9999))
43
            ->setISBN($this->faker->isbn13)
44
            ->setVolume($this->faker->numberBetween(1, 9999))
45
            ->setPart($this->faker->numberBetween(1, 9999))
46
            ->setLanguage($this->faker->name)
47
            ->setBinding($this->faker->name)
48
            ->setPageExtent($this->faker->numberBetween(1, 9999))
49
            ->setTableOfContents($this->faker->name)
50
        ;
51
    }
52
}
53