public function test_translated_in_scope_works_with_default_locale() { App::setLocale('de'); $translatedCountries = Country::translatedIn()->get(); $this->assertSame($translatedCountries->count(), 1); $this->assertSame('Griechenland', $translatedCountries->first()->name); }
/** * @test */ public function translated_in_scope_returns_only_translated_records_for_this_locale() { $translatedCountries = Country::translatedIn('fr')->get(); $this->assertEquals($translatedCountries->count(), 1); }