@@ 9-31 (lines=23) @@ | ||
6 | ||
7 | use Yproximite\Api\Model\Field\FieldTranslation; |
|
8 | ||
9 | class FieldTranslationSpec extends ObjectBehavior |
|
10 | { |
|
11 | function it_is_initializable() |
|
12 | { |
|
13 | $this->shouldHaveType(FieldTranslation::class); |
|
14 | } |
|
15 | ||
16 | function let() |
|
17 | { |
|
18 | $data = [ |
|
19 | 'locale' => 'en', |
|
20 | 'value' => 'Required field', |
|
21 | ]; |
|
22 | ||
23 | $this->beConstructedWith($data); |
|
24 | } |
|
25 | ||
26 | function it_should_be_hydrated() |
|
27 | { |
|
28 | $this->getLocale()->shouldReturn('en'); |
|
29 | $this->getValue()->shouldReturn('Required field'); |
|
30 | } |
|
31 | } |
|
32 |
@@ 9-31 (lines=23) @@ | ||
6 | ||
7 | use Yproximite\Api\Model\Site\SiteRoute; |
|
8 | ||
9 | class SiteRouteSpec extends ObjectBehavior |
|
10 | { |
|
11 | function it_is_initializable() |
|
12 | { |
|
13 | $this->shouldHaveType(SiteRoute::class); |
|
14 | } |
|
15 | ||
16 | function let() |
|
17 | { |
|
18 | $data = [ |
|
19 | 'locale' => 'en', |
|
20 | 'path' => 'simple-route-path', |
|
21 | ]; |
|
22 | ||
23 | $this->beConstructedWith($data); |
|
24 | } |
|
25 | ||
26 | function it_should_be_hydrated() |
|
27 | { |
|
28 | $this->getLocale()->shouldReturn('en'); |
|
29 | $this->getPath()->shouldReturn('simple-route-path'); |
|
30 | } |
|
31 | } |
|
32 |