Пример #1
0
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     Yii::import('application.core.data.*');
     Yii::import('application.modules.accounts.data.*');
     $defaultDataMaker = new AccountsDefaultDataMaker();
     $defaultDataMaker->make();
     Yii::import('application.modules.contacts.data.*');
     $defaultDataMaker = new ContactsDefaultDataMaker();
     $defaultDataMaker->make();
     Currency::getAll();
     //forces base currency to be created.
     ContactsModule::loadStartingData();
 }
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     Yii::import('application.core.data.*');
     Yii::import('application.modules.contracts.data.*');
     $defaultDataMaker = new ContractsDefaultDataMaker();
     $defaultDataMaker->make();
     Yii::import('application.modules.contacts.data.*');
     $defaultDataMaker = new ContactsDefaultDataMaker();
     $defaultDataMaker->make();
     Currency::getAll();
     //forces base currency to be created.
     $currency = new Currency();
     $currency->code = 'EUR';
     $currency->rateToBase = 2;
     assert($currency->save());
     // Not Coding Standard
     $currency = new Currency();
     $currency->code = 'GBP';
     $currency->rateToBase = 2;
     assert($currency->save());
     // Not Coding Standard
 }