当前位置: 首页>>代码示例>>PHP>>正文


PHP AbstractTest::setUp方法代码示例

本文整理汇总了PHP中AbstractTest::setUp方法的典型用法代码示例。如果您正苦于以下问题:PHP AbstractTest::setUp方法的具体用法?PHP AbstractTest::setUp怎么用?PHP AbstractTest::setUp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AbstractTest的用法示例。


在下文中一共展示了AbstractTest::setUp方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->_result = $this->_test->assert->getResult();
     $this->_package = $this->_test->assert->php;
     $this->_testFilesDir = dirname(__FILE__) . '/_files';
 }
开发者ID:tpc2,项目名称:phprack,代码行数:7,代码来源:LintTest.php

示例2: setUp

 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';
 }
开发者ID:tpc2,项目名称:phprack,代码行数:7,代码来源:AbstractTest.php

示例3: setUp

 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);
 }
开发者ID:iplaydu,项目名称:Aoe_Scheduler,代码行数:35,代码来源:CronGroupsWhiteListAlwaysTest.php

示例4: setUp

 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();
 }
开发者ID:nearsoft,项目名称:php-selenium-client,代码行数:10,代码来源:WebDriverTest.php

示例5: setUp

 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();
 }
开发者ID:rafalwrzeszcz,项目名称:zf2,代码行数:15,代码来源:ConfigTest.php

示例6: setUp

 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}]';
 }
开发者ID:indynagpal,项目名称:MateCat,代码行数:47,代码来源:TmKeyManagementTest.php

示例7: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->_qos = $this->_test->assert->qos;
 }
开发者ID:tpc2,项目名称:phprack,代码行数:5,代码来源:LatencyTest.php

示例8: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->_package = $this->_test->assert->php->pear;
 }
开发者ID:tpc2,项目名称:phprack,代码行数:5,代码来源:PearTest.php

示例9: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->_package = $this->_test->assert->cpu->performance;
 }
开发者ID:tpc2,项目名称:phprack,代码行数:5,代码来源:PerformanceTest.php

示例10: setUp

 /**
  * 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);
 }
开发者ID:Niehztog,项目名称:php-nonogram,代码行数:10,代码来源:LevelParserTest.php

示例11: setUp

 public function setUp()
 {
     parent::setUp();
     $this->_targetLocator = new TargetLocator($this->_driver);
 }
开发者ID:nearsoft,项目名称:php-selenium-client,代码行数:5,代码来源:TargetLocatorTest.php

示例12: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->_package = $this->_test->assert->shell;
 }
开发者ID:tpc2,项目名称:phprack,代码行数:5,代码来源:ShellTest.php

示例13: setUp

 public function setUp()
 {
     parent::setUp();
     $this->_alert = new Alert($this->_driver);
 }
开发者ID:nearsoft,项目名称:php-selenium-client,代码行数:5,代码来源:AlertTest.php

示例14: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->_adapter = new phpRack_Adapters_Notifier_Mail_Sendmail();
 }
开发者ID:tpc2,项目名称:phprack,代码行数:5,代码来源:SendmailTest.php

示例15: setUp

 public function setUp()
 {
     parent::setUp();
     global $phpRackConfig;
     $this->_runner = new phpRack_Runner($phpRackConfig);
 }
开发者ID:tpc2,项目名称:phprack,代码行数:6,代码来源:RunnerTest.php


注:本文中的AbstractTest::setUp方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。