protected function setUp()
 {
     $this->testDb = new TestPgDb("fossclitest");
     $tables = array('users', 'upload', 'uploadtree_a', 'uploadtree', 'copyright', 'groups', 'group_user_member', 'agent', 'copyright_decision', 'copyright_ars', 'ars_master');
     $this->testDb->createPlainTables($tables);
     $this->testDb->createInheritedTables(array('uploadtree_a'));
     $this->testDb->createInheritedArsTables(array('copyright'));
     $this->testDb->insertData($tables);
     $sysConf = $this->testDb->getFossSysConf();
     $this->fo_copyright_list_path = dirname(__DIR__) . '/fo_copyright_list -c ' . $sysConf;
     $this->testInstaller = new TestInstaller($sysConf);
     $this->testInstaller->init();
 }
예제 #2
0
 private function setUpTables()
 {
     $this->testDb->createPlainTables(array('upload', 'upload_reuse', 'uploadtree', 'uploadtree_a', 'license_ref', 'license_ref_bulk', 'clearing_decision', 'clearing_decision_event', 'clearing_event', 'license_file', 'highlight', 'highlight_bulk', 'agent', 'pfile', 'ars_master', 'users', 'group_user_member', 'license_map'), false);
     $this->testDb->createSequences(array('agent_agent_pk_seq', 'pfile_pfile_pk_seq', 'upload_upload_pk_seq', 'nomos_ars_ars_pk_seq', 'license_file_fl_pk_seq', 'license_ref_rf_pk_seq', 'license_ref_bulk_lrb_pk_seq', 'clearing_decision_clearing_decision_pk_seq', 'clearing_event_clearing_event_pk_seq', 'FileLicense_pkey'), false);
     $this->testDb->createViews(array('license_file_ref'), false);
     $this->testDb->createConstraints(array('agent_pkey', 'pfile_pkey', 'upload_pkey_idx', 'clearing_event_pkey'), false);
     $this->testDb->alterTables(array('agent', 'pfile', 'upload', 'ars_master', 'license_ref_bulk', 'clearing_event', 'clearing_decision', 'license_file', 'highlight'), false);
     $this->testDb->createInheritedTables();
     $this->testDb->createInheritedArsTables(array('nomos', 'monk'));
     $this->testDb->insertData(array('pfile', 'upload', 'uploadtree_a', 'users', 'group_user_member', 'agent', 'license_file', 'nomos_ars', 'monk_ars'), false);
     $this->testDb->insertData_license_ref();
     $this->testDb->resetSequenceAsMaxOf('agent_agent_pk_seq', 'agent', 'agent_pk');
 }