ArticleTranslationSpec::let()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 11
rs 9.9
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace spec\Yproximite\Api\Model\Article;
4
5
use PhpSpec\ObjectBehavior;
6
7
use Yproximite\Api\Model\Article\ArticleTranslation;
8
9
class ArticleTranslationSpec extends ObjectBehavior
10
{
11
    function it_is_initializable()
12
    {
13
        $this->shouldHaveType(ArticleTranslation::class);
14
    }
15
16
    function let()
17
    {
18
        $data = [
19
            'locale' => 'en',
20
            'title'  => 'English translation',
21
            'body'   => 'Big text',
22
            'slug'   => 'en-translation',
23
        ];
24
25
        $this->beConstructedWith($data);
26
    }
27
28
    function it_should_be_hydrated()
29
    {
30
        $this->getLocale()->shouldReturn('en');
31
        $this->getTitle()->shouldReturn('English translation');
32
        $this->getBody()->shouldReturn('Big text');
33
        $this->getSlug()->shouldReturn('en-translation');
34
    }
35
}
36