function LimbTestCase($label = false, $auto_label = true) { if($label && $auto_label) $label = make__FILE__readable($label); parent :: UnitTestCase($label); }
function TestUpload() { parent::UnitTestCase(); $this->CI =& get_instance(); $this->DBI = $this->CI->load->database('testing', TRUE); $this->setUpDB(); }
function test_AkActiveRecord_actAsTree() { parent::UnitTestCase(); $this->_createNewTestingModelDatabase('AkTestCategory'); $this->_createNewTestingModel('AkTestCategory'); $this->_createNewTestingModel('AkDependentTestCategory'); }
function site_object_tester($class_name) { $this->db =& db_factory :: instance(); $this->class_name = $class_name; parent :: UnitTestCase(); }
function __construct() { parent::UnitTestCase(); global $CFG; // For the demo, our 'remote' host is actually our local host. $this->wwwroot = $CFG->wwwroot; $this->remoteRoot = $this->wwwroot; }
function test_AkActiveRecord_observer() { parent::UnitTestCase(); $this->_createNewTestingModelDatabase('AkTestObservedPerson'); $this->_createNewTestingModelDatabase('AkTestObservedAccount'); $this->_createNewTestingModel('AkTestObservedPerson'); $this->_createNewTestingModel('AkTestObservedAccount'); $this->_createNewTestingModel('AkTestObservedPersonObserver'); $this->_createNewTestingModel('AkTestAuditor'); }
function test_image_library() { parent::UnitTestCase(); $this->input_file = TEST_CASES_DIR . '/image/images/1.jpg'; $this->output_file = TEST_CASES_DIR . '/image/images/2.jpg'; $input_type = 'jpeg'; $output_type = 'jpeg'; $this->library->set_input_file($this->input_file, $input_type); $this->library->set_output_file($this->output_file, $output_type); }
public function __construct($name = 'Selenium Test Case') { parent::UnitTestCase($name); if (empty($this->browser)) { trigger_error('browser property must be set in ' . get_class($this)); exit; } if (empty($this->browserUrl)) { trigger_error('browserUrl property must be set in ' . get_class($this)); exit; } }
function test_AkActiveRecord() { parent::UnitTestCase(); $this->_createNewTestingModelDatabase('AkTestUser'); $this->_createNewTestingModel('AkTestUser'); $this->_createNewTestingModelDatabase('AkTestMember'); $this->_createNewTestingModel('AkTestMember'); $this->_createNewTestingModel('AkTestField'); $this->_createNewTestingModelDatabase('AkTestField'); $this->_createNewTestingModelDatabase('AkTestComment'); $this->_createNewTestingModel('AkTestComment'); }
/** * Constructor Once/TestCase * Prequsites for this TestCase to run: Create a sqlite DB */ public function DBOperationsTest() { @unlink(TMP . 'test.db'); $query = ' CREATE TABLE authors ( id INTEGER PRIMARY KEY, name VARCHAR(100), email VARCHAR(150) ); '; sqlite_query(sqlite_open(TMP . 'test.db'), $query); parent::UnitTestCase(); }
/** * Ethna_UnitTestCaseのコンストラクタ * * @access public * @param object Ethna_Controller &$controller コントローラオブジェクト */ function Ethna_UnitTestCase(&$controller) { parent::UnitTestCase(); // オブジェクトの設定 $this->controller =& $controller; $this->ctl =& $this->controller; $this->backend =& $this->ctl->getBackend(); $this->session =& $this->backend->getSession(); // 変数の初期化 $this->action_form = $this->af = null; $this->action_class = $this->ac = null; $this->view_class = $this->vc = null; }
function Ethna_UnitTestBase($label = false) { parent::UnitTestCase($label); // controller $this->ctl =& Ethna_Controller::getInstance(); if ($this->ctl === null) { $this->ctl =& new Ethna_Controller(); } $this->controller =& $this->ctl; // backend $this->backend =& $this->ctl->getBackend(); // actionform if ($this->ctl->action_form === null) { $this->ctl->action_form =& new Ethna_ActionForm($this->ctl); $this->backend->setActionForm($this->ctl->action_form); } // viewclass if ($this->ctl->view === null) { $this->ctl->view =& new Ethna_ViewClass($this->backend, '', ''); } }
function search_engine_google_rule_test() { parent :: UnitTestCase(); }
function phpbb_user_test() { parent :: UnitTestCase(); $this->db = db_factory :: instance(); }
function __construct() { parent::UnitTestCase(); }
function search_query_test($name = 'search query test case') { parent::UnitTestCase($name); }
function test_site_object_auto_identifier() { $this->db =& db_factory :: instance(); parent :: UnitTestCase(); }
function __construct() { parent::UnitTestCase(); $this->filename = dirname(__FILE__) . '/sample/test.mpg'; }
/** * Constructor Once/TestCase * Prequsites for this TestCase to run: Create a sqlite DB */ public function ValidatorTest() { @unlink(TMP . 'test.db'); parent::UnitTestCase(); }
function test_log() { parent::UnitTestCase(); }
function test_site_object_fetch_accessible() { parent::UnitTestCase(); }
/** * In the constructor, record the max(id) of each test table into a csv file. * If this file already exists, it means that a previous run of unit tests * did not complete, and has left data undeleted in the DB. This data is then * deleted and the file is retained. Otherwise it is created. * * throws moodle_exception if CSV file cannot be created */ public function __construct($label = false) { global $DB, $CFG; if (empty($CFG->unittestprefix)) { return; } parent::UnitTestCase($label); // MDL-16483 Get PKs and save data to text file $this->pkfile = $CFG->dataroot . '/testtablespks.csv'; $this->cfg = $CFG; UnitTestDB::instantiate(); $tables = $DB->get_tables(); // The file exists, so use it to truncate tables (tests aborted before test data could be removed) if (file_exists($this->pkfile)) { $this->truncate_test_tables($this->get_table_data($this->pkfile)); } else { // Create the file $tabledata = ''; foreach ($tables as $table) { if ($table != 'sessions') { if (!($max_id = $DB->get_field_sql("SELECT MAX(id) FROM {$CFG->unittestprefix}{$table}"))) { $max_id = 0; } $tabledata .= "{$table}, {$max_id}\n"; } } if (!file_put_contents($this->pkfile, $tabledata)) { $a = new stdClass(); $a->filename = $this->pkfile; throw new moodle_exception('testtablescsvfileunwritable', 'tool_unittest', '', $a); } } }
function test_project_db_tables($name = 'db tables test case') { $this->db =& db_factory::instance(); parent::UnitTestCase($name); }
function test_stats_counter() { parent::UnitTestCase(); $this->db = db_factory::instance(); }
function test_site_object_manipulation() { $this->db =& db_factory::instance(); parent::UnitTestCase(); }
public function __construct() { parent::UnitTestCase(); $this->ci =& get_instance(); }
function search_engine_yandex_rule_test() { parent::UnitTestCase(); }
function test_user_object() { parent::UnitTestCase(); $this->db = db_factory::instance(); }
function test_ip() { parent :: UnitTestCase(); }
public function __construct() { parent::UnitTestCase(); $this->recreateDatabase(); $this->loadedFixtures = SFixture::createFixtures(FIXTURES_DIR, $this->fixtures); }