コード例 #1
0
 public function test_configuration_overrides_fillable()
 {
     App::make('config')->set('translatable.always_fillable', true);
     $country = new CountryStrict(['en' => ['name' => 'Not fillable'], 'code' => 'te']);
     $this->assertSame($country->getTranslation('en')->name, 'Not fillable');
 }
コード例 #2
0
 public function test_it_does_not_delete_translations_while_force_deleting()
 {
     $country = CountryStrict::find(2);
     $country->forceDelete();
     $after = CountryTranslation::where('country_id', '=', 2)->get();
     $this->assertEquals(0, count($after));
 }