1 | <?php |
||
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 |