protected function seedSampleSourceAndData()
 {
     $datasource = new FileDatasource($this->themePath, new Filesystem());
     $resolver = new Resolver(['theme1' => $datasource]);
     $resolver->setDefaultDatasource('theme1');
     Model::setDatasourceResolver($resolver);
     LocaleModel::unguard();
     LocaleModel::firstOrCreate(['code' => 'fr', 'name' => 'French', 'is_enabled' => 1]);
     LocaleModel::reguard();
     $this->recycleSampleData();
 }
Esempio n. 2
0
 public function testDefaultDatasource()
 {
     $resolver = new Resolver();
     $resolver->setDefaultDatasource('theme1');
     $this->assertEquals('theme1', $resolver->getDefaultDatasource());
 }