Example #1
0
 function init()
 {
     $this->add('xepan\\accounts\\page_tests_init');
     $this->createLedgers();
     // $this->createNewTransaction();
     parent::init();
 }
Example #2
0
 function init()
 {
     // $this->add('xepan\commerce\page_tests_init')->resetDB();
     $this->pdb = $this->add('DB')->connect($this->app->getConfig('dsn2'));
     $last_cf_value_model = $this->add('xepan\\commerce\\Model_Item_CustomField_Value')->setOrder('id', 'desc')->setLimit(1)->tryLoadAny();
     $this->last_cf_asso_value_id = $last_cf_value_model->id;
     //first remove all filterable specification value
     $filter_spec = $this->add('xepan\\commerce\\Model_Item_CustomField_Generic')->addCondition('is_filterable', true);
     foreach ($filter_spec as $spec) {
         $all_pre_asso = $this->add('xepan\\commerce\\Model_Item_CustomField_Association')->addCondition('customfield_generic_id', $spec->id);
         foreach ($all_pre_asso as $asso) {
             $this->add('xepan\\commerce\\Model_Item_CustomField_Value')->addCondition('customfield_association_id', $asso->id)->deleteAll();
         }
     }
     try {
         $this->app->db->dsql()->expr('SET FOREIGN_KEY_CHECKS = 0;')->execute();
         $this->app->db->dsql()->expr('SET unique_checks=0;')->execute();
         $this->app->db->dsql()->expr('SET autocommit=0;')->execute();
         $this->api->db->beginTransaction();
         parent::init();
         $this->app->db->dsql()->expr('SET FOREIGN_KEY_CHECKS = 1;')->execute();
         $this->app->db->dsql()->expr('SET unique_checks=1;')->execute();
         $this->api->db->commit();
     } catch (\Exception_StopInit $e) {
     } catch (\Exception $e) {
         $this->app->db->dsql()->expr('SET FOREIGN_KEY_CHECKS = 1;')->execute();
         $this->app->db->dsql()->expr('SET unique_checks=1;')->execute();
         $this->api->db->rollback();
         throw $e;
     }
 }
Example #3
0
 function init()
 {
     $this->add('xepan\\commerce\\page_tests_init');
     $this->item = $this->add('xepan\\commerce\\Model_Item');
     $this->item->loadBy('name', 'Test0');
     parent::init();
 }
Example #4
0
 function init()
 {
     // $this->add('xepan\commerce\page_tests_init')->resetDB();
     $this->pdb = $this->add('DB')->connect($this->app->getConfig('dsn2'));
     try {
         $this->app->db->dsql()->expr('SET FOREIGN_KEY_CHECKS = 0;')->execute();
         $this->app->db->dsql()->expr('SET unique_checks=0;')->execute();
         $this->app->db->dsql()->expr('SET autocommit=0;')->execute();
         $this->api->db->beginTransaction();
         parent::init();
         $this->app->db->dsql()->expr('SET FOREIGN_KEY_CHECKS = 1;')->execute();
         $this->app->db->dsql()->expr('SET unique_checks=1;')->execute();
         $this->api->db->commit();
     } catch (\Exception_StopInit $e) {
     } catch (\Exception $e) {
         $this->app->db->dsql()->expr('SET FOREIGN_KEY_CHECKS = 1;')->execute();
         $this->app->db->dsql()->expr('SET unique_checks=1;')->execute();
         $this->api->db->rollback();
         throw $e;
     }
 }
 function init()
 {
     // $this->add('xepan\commerce\page_tests_init')->resetDB();
     $this->pdb = $this->add('DB')->connect('mysql://*****:*****@localhost/prime_gen_1');
     try {
         $this->app->db->dsql()->expr('SET FOREIGN_KEY_CHECKS = 0;')->execute();
         $this->app->db->dsql()->expr('SET unique_checks=0;')->execute();
         $this->app->db->dsql()->expr('SET autocommit=0;')->execute();
         $this->api->db->beginTransaction();
         parent::init();
         $this->app->db->dsql()->expr('SET FOREIGN_KEY_CHECKS = 1;')->execute();
         $this->app->db->dsql()->expr('SET unique_checks=1;')->execute();
         $this->api->db->commit();
     } catch (\Exception_StopInit $e) {
     } catch (\Exception $e) {
         $this->app->db->dsql()->expr('SET FOREIGN_KEY_CHECKS = 1;')->execute();
         $this->app->db->dsql()->expr('SET unique_checks=1;')->execute();
         $this->api->db->rollback();
         throw $e;
     }
 }
Example #6
0
File: 003post.php Project: xepan/hr
 function init()
 {
     $this->add('xepan\\hr\\page_tests_init');
     parent::init();
 }
Example #7
0
 function init()
 {
     $this->add('xepan\\commerce\\page_tests_init')->createCateories()->createItems();
     parent::init();
 }
 function init()
 {
     $this->add('xepan\\commerce\\page_tests_init')->createGenericCustomfields()->createItems();
     // ->customfieldassoc();
     parent::init();
 }
 function init()
 {
     $this->add('xepan\\accounts\\page_tests_init');
     $this->createGroups();
     parent::init();
 }