@@ 22-30 (lines=9) @@ | ||
19 | $this->assertSame('Griechenland', $translatedCountries->first()->name); |
|
20 | } |
|
21 | ||
22 | public function test_not_translated_in_scope_returns_only_not_translated_records_for_this_locale() |
|
23 | { |
|
24 | $notTranslatedCountries = Country::notTranslatedIn('en')->get(); |
|
25 | $this->assertCount(2, $notTranslatedCountries); |
|
26 | ||
27 | foreach ($notTranslatedCountries as $notTranslatedCountry) { |
|
28 | $this->assertFalse($notTranslatedCountry->hasTranslation('en')); |
|
29 | } |
|
30 | } |
|
31 | ||
32 | public function test_not_translated_in_scope_works_with_default_locale() |
|
33 | { |
|
@@ 32-41 (lines=10) @@ | ||
29 | } |
|
30 | } |
|
31 | ||
32 | public function test_not_translated_in_scope_works_with_default_locale() |
|
33 | { |
|
34 | App::setLocale('en'); |
|
35 | $notTranslatedCountries = Country::notTranslatedIn()->get(); |
|
36 | $this->assertCount(2, $notTranslatedCountries); |
|
37 | ||
38 | foreach ($notTranslatedCountries as $notTranslatedCountry) { |
|
39 | $this->assertFalse($notTranslatedCountry->hasTranslation('en')); |
|
40 | } |
|
41 | } |
|
42 | ||
43 | public function test_translated_scope_returns_records_with_at_least_one_translation() |
|
44 | { |