function setUp() { VF_Singleton::getInstance()->setReadAdapter(new VF_TestDbAdapter(array('dbname' => VAF_DB_NAME, 'username' => VAF_DB_USERNAME, 'password' => VAF_DB_PASSWORD))); $schemaGenerator = new VF_Schema_Generator(); $schemaGenerator->dropExistingTables(); VF_Schema::$levels = null; }
function testShouldSetSchema() { $schemaGenerator = new VF_Schema_Generator(); $schemaGenerator->dropExistingTables(); VF_Schema::$levels = null; $command = __DIR__ . '/vfmagento schema --force --levels="year,make,model"'; exec($command); $schema = new VF_Schema(); $this->assertEquals(array('year', 'make', 'model'), $schema->getLevels(), 'should create default schema of MMY'); }
function setUp() { Elite_Vaf_Helper_Data::getInstance(true); Elite_Vaf_Helper_Data::getInstance()->setRequest($this->getRequest()); VF_Schema::$levels = null; $_SESSION = array(); $_GET = array(); $_REQUEST = array(); $_POST = array(); $_FILES = array(); $this->resetIdentityMaps(); $this->truncateTables(); $this->dropAndRecreateMockProductTable(); Mage::resetRegistry(); $this->doSetUp(); }
function setUp() { VF_Singleton::reset(); VF_Singleton::getInstance(true); VF_Singleton::getInstance()->setRequest(new Zend_Controller_Request_Http()); $database = new VF_TestDbAdapter(array('dbname' => VAF_DB_NAME, 'username' => VAF_DB_USERNAME, 'password' => VAF_DB_PASSWORD)); VF_Singleton::getInstance()->setReadAdapter($database); VF_Schema::$levels = null; $_SESSION = array(); $_GET = array(); $_REQUEST = array(); $_POST = array(); $_FILES = array(); $this->resetIdentityMaps(); $this->dropAndRecreateMockProductTable(); if (class_exists('Mage', false)) { Mage::resetRegistry(); } $this->doSetUp(); }
static function reset() { self::$levels = ''; self::$global_status = ''; }