Code Duplication    Length = 25-25 lines in 4 locations

spec/Model/Article/CategoryTranslationSpec.php 1 location

@@ 9-33 (lines=25) @@
6
7
use Yproximite\Api\Model\Article\CategoryTranslation;
8
9
class CategoryTranslationSpec extends ObjectBehavior
10
{
11
    function it_is_initializable()
12
    {
13
        $this->shouldHaveType(CategoryTranslation::class);
14
    }
15
16
    function let()
17
    {
18
        $data = [
19
            'locale'      => 'en',
20
            'title'       => 'English translation',
21
            'description' => 'Big text',
22
        ];
23
24
        $this->beConstructedWith($data);
25
    }
26
27
    function it_should_be_hydrated()
28
    {
29
        $this->getLocale()->shouldReturn('en');
30
        $this->getTitle()->shouldReturn('English translation');
31
        $this->getDescription()->shouldReturn('Big text');
32
    }
33
}
34

spec/Model/Company/CompanySpec.php 1 location

@@ 9-33 (lines=25) @@
6
7
use Yproximite\Api\Model\Company\Company;
8
9
class CompanySpec extends ObjectBehavior
10
{
11
    function it_is_initializable()
12
    {
13
        $this->shouldHaveType(Company::class);
14
    }
15
16
    function let()
17
    {
18
        $data = [
19
            'id'          => '4',
20
            'companyName' => 'First company',
21
            'parent'      => '1',
22
        ];
23
24
        $this->beConstructedWith($data);
25
    }
26
27
    function it_should_be_hydrated()
28
    {
29
        $this->getId()->shouldReturn(4);
30
        $this->getName()->shouldReturn('First company');
31
        $this->getParentId()->shouldReturn(1);
32
    }
33
}
34

spec/Model/Location/LocationTranslationSpec.php 1 location

@@ 9-33 (lines=25) @@
6
7
use Yproximite\Api\Model\Location\LocationTranslation;
8
9
class LocationTranslationSpec extends ObjectBehavior
10
{
11
    function it_is_initializable()
12
    {
13
        $this->shouldHaveType(LocationTranslation::class);
14
    }
15
16
    function let()
17
    {
18
        $data = [
19
            'locale'       => 'en',
20
            'title'        => 'Some location',
21
            'openingHours' => '24/7',
22
        ];
23
24
        $this->beConstructedWith($data);
25
    }
26
27
    function it_should_be_hydrated()
28
    {
29
        $this->getLocale()->shouldReturn('en');
30
        $this->getTitle()->shouldReturn('Some location');
31
        $this->getOpeningHours()->shouldReturn('24/7');
32
    }
33
}
34

spec/Model/TeamWorker/TeamWorkerSpec.php 1 location

@@ 9-33 (lines=25) @@
6
7
use Yproximite\Api\Model\TeamWorker\TeamWorker;
8
9
class TeamWorkerSpec extends ObjectBehavior
10
{
11
    function it_is_initializable()
12
    {
13
        $this->shouldHaveType(TeamWorker::class);
14
    }
15
16
    function let()
17
    {
18
        $data = [
19
            'id'        => '1',
20
            'lastName'  => 'Bob',
21
            'firstName' => 'Morane',
22
        ];
23
24
        $this->beConstructedWith($data);
25
    }
26
27
    function it_should_be_hydrated()
28
    {
29
        $this->getId()->shouldReturn(1);
30
        $this->getLastName()->shouldReturn('Bob');
31
        $this->getFirstName()->shouldReturn('Morane');
32
    }
33
}
34