public function test_install_db_tables() { require_once dirname(__FILE__) . '/../../fixtures/app/installers/framework_installer.php'; $installer = new FrameworkInstaller(); $installer->uninstall(); $installer->install(); }
function resetFrameworkDatabaseTables() { require_once(AK_APP_DIR.DS.'installers'.DS.'framework_installer.php'); $installer = new FrameworkInstaller(); $installer->uninstall(); $installer->install(); if(isset($_SESSION['__activeRecordColumnsSettingsCache'])){ unset($_SESSION['__activeRecordColumnsSettingsCache']); } }
function test_start() { require_once(AK_LIB_DIR.DS.'AkActiveRecord.php'); require_once(AK_LIB_DIR.DS.'AkInstaller.php'); require_once(AK_LIB_DIR.DS.'AkActiveRecord'.DS.'AkHasOne.php'); require_once(AK_LIB_DIR.DS.'AkActiveRecord'.DS.'AkBelongsTo.php'); require_once(AK_APP_DIR.DS.'shared_model.php'); require_once(AK_APP_DIR.DS.'installers'.DS.'framework_installer.php'); $installer = new FrameworkInstaller(); $installer->uninstall(); $installer->install(); $models = array('Picture', 'Thumbnail','Panorama', 'Property', 'PropertyType', 'Person', 'Account'); $this->installAndIncludeModels(array('Picture', 'Thumbnail','Panorama', 'Property', 'PropertyType', 'Person', 'Account')); unset($_SESSION['__activeRecordColumnsSettingsCache']); }
function test_start() { require_once(AK_LIB_DIR.DS.'AkActiveRecord.php'); require_once(AK_LIB_DIR.DS.'AkInstaller.php'); require_once(AK_LIB_DIR.DS.'AkActiveRecord'.DS.'AkHasOne.php'); require_once(AK_LIB_DIR.DS.'AkActiveRecord'.DS.'AkBelongsTo.php'); require_once(AK_APP_DIR.DS.'shared_model.php'); require_once(AK_APP_DIR.DS.'installers'.DS.'framework_installer.php'); $installer = new FrameworkInstaller(); $installer->uninstall(); $installer->install(); $models = array('Picture', 'Thumbnail','Panorama', 'Property', 'PropertyType'); foreach ($models as $model){ require_once(AK_APP_DIR.DS.'installers'.DS.AkInflector::underscore($model).'_installer.php'); require_once(AK_MODELS_DIR.DS.AkInflector::underscore($model).'.php'); $installer_name = $model.'Installer'; $installer = new $installer_name(); $installer->uninstall(); $installer->install(); } unset($_SESSION['__activeRecordColumnsSettingsCache']); }
function resetFrameworkDatabaseTables() { require_once(AK_APP_DIR.DS.'installers'.DS.'framework_installer.php'); $installer = new FrameworkInstaller(); $installer->uninstall(); $installer->install(); AkDbSchemaCache::clearAll(); }
function runFrameworkInstaller() { require_once AK_LIB_DIR . DS . 'AkInstaller.php'; require_once AK_APP_DIR . DS . 'installers' . DS . 'framework_installer.php'; foreach (array('development', 'production', 'testing') as $mode) { $db_conn = Ak::db($this->_getDsn($mode)); $installer = new FrameworkInstaller($db_conn); $installer->install(); } return true; }
<?php set_time_limit(0); define('ALL_TESTS_CALL', true); define('ALL_TESTS_RUNNER', true); define('AK_TEST_DATABASE_ON', true); require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'fixtures' . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.php'; require_once AK_LIB_DIR . DS . 'AkInstaller.php'; require_once AK_APP_DIR . DS . 'installers' . DS . 'framework_installer.php'; $installer = new FrameworkInstaller(); $installer->uninstall(); $installer->install(); session_start(); $test =& new GroupTest('Unit tests for the Akelos Framework'); function load_tests($dir, &$test) { $d = dir($dir); while (false !== ($entry = $d->read())) { if ($entry != '.' && $entry != '..' && $entry[0] != '.' && $entry[0] != '_') { $entry = $dir . DS . $entry; if (is_dir($entry)) { load_tests($entry, $test); } else { if (!strstr(file_get_contents($entry), 'ALL_TESTS_RUNNER')) { $test->addTestFile($entry); } else { require_once $entry; } } } }