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