protected function setUp() { parent::setUp(); $this->_result = $this->_test->assert->getResult(); $this->_package = $this->_test->assert->php; $this->_testFilesDir = dirname(__FILE__) . '/_files'; }
protected function setUp() { parent::setUp(); $this->_result = $this->_test->assert->getResult(); $this->_package = $this->_test->assert->disc->file; $this->_testFilesDir = PHPRACK_PATH . '/../test/phpRack/Package/Disc/_files'; }
protected function setUp() { parent::setUp(); $this->groups['groupA'] = uniqid('groupA_'); $this->groups['groupB'] = uniqid('groupB_'); $jobWithGroupA = Mage::getModel('aoe_scheduler/job'); /* @var $jobWithGroupA Aoe_Scheduler_Model_Job */ $jobWithGroupA->setScheduleCronExpr('always'); $jobWithGroupA->setJobCode(uniqid('t_job_')); $jobWithGroupA->setRunModel('aoe_scheduler/task_test::run'); $jobWithGroupA->setGroups($this->groups['groupA']); $jobWithGroupA->setIsActive(true); $jobWithGroupA->save(); $this->jobs['jobWithGroupA'] = $jobWithGroupA; $jobWithGroupB = Mage::getModel('aoe_scheduler/job'); /* @var $jobWithGroupB Aoe_Scheduler_Model_Job */ $jobWithGroupB->setScheduleCronExpr('always'); $jobWithGroupB->setJobCode(uniqid('t_job_')); $jobWithGroupB->setRunModel('aoe_scheduler/task_test::run'); $jobWithGroupB->setGroups($this->groups['groupB']); $jobWithGroupB->setIsActive(true); $jobWithGroupB->save(); $this->jobs['jobWithGroupB'] = $jobWithGroupB; $jobWithGroupAandB = Mage::getModel('aoe_scheduler/job'); /* @var $jobWithGroupAandB Aoe_Scheduler_Model_Job */ $jobWithGroupAandB->setScheduleCronExpr('always'); $jobWithGroupAandB->setJobCode(uniqid('t_job_')); $jobWithGroupAandB->setRunModel('aoe_scheduler/task_test::run'); $jobWithGroupAandB->setGroups("{$this->groups['groupA']},{$this->groups['groupB']}"); $jobWithGroupAandB->setIsActive(true); $jobWithGroupAandB->save(); $this->jobs['jobWithGroupAandB'] = $jobWithGroupAandB; // fake schedule generation to avoid it to be generated on the next run: Mage::app()->saveCache(time(), Mage_Cron_Model_Observer::CACHE_KEY_LAST_SCHEDULE_GENERATE_AT, array('crontab'), null); }
public function setUp() { parent::setUp(); $this->_navigationMock = $this->getMock('Navigation', array('refresh', 'to', 'back', 'forward')); $this->_windowMock = $this->getMock('Window', array('maximize', 'close', 'setSize', 'getSize', 'setPosition', 'getPosition')); $this->_targetLocatorMock = $this->getMock('TargetLocator', array('window', 'frame')); $this->_originalNavigate = $this->_driver->navigate(); $this->_originalWindow = $this->_driver->manage()->window(); $this->_originalTargetLocator = $this->_driver->switchTo(); }
public function setUp() { parent::setUp(); $this->_configProvider = new ProviderConfig(); $this->_configProvider->setRegistry($this->_registry); // Store original autoloaders $this->loaders = spl_autoload_functions(); if (!is_array($this->loaders)) { // spl_autoload_functions does not return empty array when no // autoloaders registered... $this->loaders = array(); } // Store original include_path $this->includePath = get_include_path(); }
public function setUp() { parent::setUp(); Tests_DBLoader4Test::getUp(); // MemcacheHandler::getInstance( array( '127.0.0.1:11211' => 1 ) )->flush(); self::$dummyTmKey_key = "fookey"; self::$dummyTmKey_owner = 1; self::$dummyTmKey_r = 1; self::$dummyTmKey_w = 0; self::$dummyTmKey_uid_transl = 123; self::$dummyTmKey_r_transl = 0; self::$dummyTmKey_w_transl = 1; self::$dummyTmKey_edit = true; self::$uid_translator = 123; self::$validJsonTmKeyArr = '[{"tm":true,"glos":false,"owner":true,"uid_transl":null,"uid_rev":null,"name":"My personal Key","key":"993dddb1c603b4e57f69","r":"1","w":"0","r_transl":null,"w_transl":null,"r_rev":null,"w_rev":null,"source":null,"target":null}]'; self::$invalidJsonTmKeyArr = '[{tm":true,"glos":true"owner":true,"uid_transl":null,"uid_rev":null,"name":"My personal Key","key":"993dddb1c603b4e57f69","r":"1","w":"0","r_transl":null,"w_transl":null,"r_rev":null,"w_rev":null,"source":null,"target":null}]'; self::$validJsonTmKeyArrWithUidTranslator = '[{"tm":true,"glos":false,"owner":false,"uid_transl":123,"uid_rev":null,"name":"My personal Key","key":"993dddb1c603b4e57f69","r":"1","w":"0","r_transl":"1","w_transl":"1","r_rev":null,"w_rev":null,"source":null,"target":null}]'; self::$invalidClientJson = '[{name""My personal Key","key":"993dddb1c603b4e57f69","r":"1","w":"0"}]'; self::$validClientJson = '[{"name":"My personal Key","key":"993dddb1c603b4e57f69","r":"1","w":"0"},{"name":"My second Key","key":"testclientKey","r":"1","w":"1"}]'; self::$invalidServerJson = '[{tm":true,"glos":true"owner":true,"uid_transl":null,"uid_rev":null,"name":"My personal Key","key":"993dddb1c603b4e57f69","r":"1","w":"0","r_transl":null,"w_transl":null,"r_rev":null,"w_rev":null,"source":null,"target":null}]'; self::$validServerJson = '[{"tm":true,"glos":true,"owner":true,"uid_transl":null,"uid_rev":null,"name":"My personal Key","key":"993dddb1c603b4e57f69","r":"1","w":"0","r_transl":null,"w_transl":null,"r_rev":null,"w_rev":null,"source":null,"target":null}]'; self::$invalidGrantString = "invalidGrantString"; self::$invalidTypeString = "invalidTypeString"; self::$invalidRoleString = "invalidRoleString"; $newTm = array(); $newTm['key'] = sha1(chr(rand(97, 122))); $newTm['owner'] = $newTm['key'] & 1; $newTm['r'] = $newTm['key'][5] & 1; $newTm['w'] = $newTm['key'][12] & 1; $newTm['r_transl'] = $newTm['key'][2] & 1; $newTm['w_transl'] = $newTm['key'][4] & 1; $newTm['uid_transl'] = rand(1, 1024); self::$validTmKeyStructArr = $newTm; self::$invalidTmKeyStructArr = self::$validTmKeyStructArr; self::$invalidTmKeyStructArr['invalidField'] = 'invalidField'; self::$srv_json_ABC = '[{"tm":true,"glos":false,"owner":true,"key":"0000123ABC","name":"","r":"1","w":"1","uid_transl":123,"uid_rev":null,"r_transl":1,"w_transl":0,"r_rev":null,"w_rev":null,"source":null,"target":null}]'; self::$srv_json_GHI = '[{"tm":true,"glos":false,"owner":true,"key":"0000123GHI","name":"My GHI","r":"1","w":"1","uid_transl":null,"uid_rev":null,"r_transl":null,"w_transl":null,"r_rev":null,"w_rev":null,"source":null,"target":null}]'; self::$srv_json_ABC_GHI_DEF = '[{"tm":true,"glos":false,"owner":true,"key":"0000123ABC","name":"My ABC","r":"1","w":"1","uid_transl":123,"uid_rev":null,"r_transl":1,"w_transl":0,"r_rev":null,"w_rev":null,"source":null,"target":null},' . '{"tm":true,"glos":false,"owner":true,"key":"0000123GHI","name":"My GHI","r":"1","w":"1","uid_transl":null,"uid_rev":null,"r_transl":null,"w_transl":null,"r_rev":null,"w_rev":null,"source":null,"target":null},' . '{"tm":true,"glos":false,"owner":false,"key":"0000123DEF","name":"My DEF","r":null,"w":null,"uid_transl":123,"uid_rev":null,"r_transl":1,"w_transl":1,"r_rev":null,"w_rev":null,"source":null,"target":null}]'; self::$client_json_ABC = '[{"key":"0000123ABC","name":"My DEF","r":1,"w":1}]'; self::$client_json_ABC_DEF = '[{"key":"0000123ABC","name":"My ABC","r":1,"w":1},' . '{"key":"0000123DEF","name":"My DEF","r":1,"w":0}]'; self::$client_json_DEF = '[{"key":"0000123DEF","name":"My DEF","r":1,"w":0}]'; self::$client_json_GHI_DEF = '[{"key":"*****23GHI","name":"My GHI","r":1,"w":1},' . '{"key":"0000123DEF","name":"My DEF","r":1,"w":0}]'; //the second key is invalid, we expect unchanged in server side self::$client_json_ABC_GHI_JKL = '[{"key":"0000123ABC","name":"My ABC","r":1,"w":1},' . '{"key":"*****23GHI","name":"My GHI","r":1,"w":0},' . '{"key":"0000123JKL","name":"My JKL","r":1,"w":0}]'; self::$client_json_GHI = '[{"key":"0000123GHI","name":"My GHI","r":0,"w":1}]'; self::$client_json_INVALID_GHI = '[{"key":"0000123GHI","name":"My GHI","r":0,"w":0}]'; }
protected function setUp() { parent::setUp(); $this->_qos = $this->_test->assert->qos; }
protected function setUp() { parent::setUp(); $this->_package = $this->_test->assert->php->pear; }
protected function setUp() { parent::setUp(); $this->_package = $this->_test->assert->cpu->performance; }
/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ protected function setUp() { parent::setUp(); $this->labelFactory = new \Nonogram\Label\Factory(new \Nonogram\Label\LabelProviderCells()); $this->labelFactory->setContainer($this->container); }
public function setUp() { parent::setUp(); $this->_targetLocator = new TargetLocator($this->_driver); }
protected function setUp() { parent::setUp(); $this->_package = $this->_test->assert->shell; }
public function setUp() { parent::setUp(); $this->_alert = new Alert($this->_driver); }
protected function setUp() { parent::setUp(); $this->_adapter = new phpRack_Adapters_Notifier_Mail_Sendmail(); }
public function setUp() { parent::setUp(); global $phpRackConfig; $this->_runner = new phpRack_Runner($phpRackConfig); }
protected function setUp() { parent::setUp(); $this->_adapter = new phpRack_Adapters_Db_Mysql(); }
protected function setUp() { parent::setUp(); $this->_adapter = phpRack_Adapters_Cpu::factory(); }
protected function setUp() { parent::setUp(); $this->_package = $this->_test->assert->php; $this->_result = $this->_test->assert->getResult(); }
/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ protected function setUp() { parent::setUp(); $this->object = $this->container->get('testMemory'); }