예제 #1
0
 public function testRunningMigration()
 {
     $country = Country::find(1);
     $this->assertEquals('gr', $country->code);
 }
 public function test_config_overrides_apps_locale()
 {
     $country = Country::find(1);
     App::make('config')->set('translatable.locale', 'de');
     $this->assertSame('Griechenland', $country->name);
 }
 public function test_it_should_hide_attributes_after_to_array()
 {
     $country = Country::find(1);
     $this->assertEquals(true, isset($country->toArray()['name']));
     // it is equivalent to set
     //      protected $hidden = ['name'];
     // in Eloquent
     $country->setHidden(['name']);
     $this->assertEquals(false, isset($country->toArray()['name']));
 }