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


PHP UnitTestCase::setUp方法代码示例

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


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

示例1: setUp

 function setUp()
 {
     parent::setUp();
     $this->factory = TestHelper::getPartialMock('Tracker_CrossSearch_SharedFieldFactory', array('getDao'));
     $this->dao = new MockTracker_CrossSearch_SharedFieldDao();
     $this->factory->setReturnValue('getDao', $this->dao);
 }
开发者ID:nickl-,项目名称:tuleap,代码行数:7,代码来源:SharedFieldFactoryTest.php

示例2: setUp

 public function setUp(DiInterface $di = NULL, Config $config = NULL)
 {
     vfsStream::setup('root');
     vfsStream::newFile('file.php')->at(vfsStreamWrapper::getRoot());
     $this->file = vfsStream::url('root/file.php');
     parent::setUp($di, $config);
 }
开发者ID:mirobrando,项目名称:ng-phalcon,代码行数:7,代码来源:ServiceTest.php

示例3: setUp

 public function setUp()
 {
     parent::setUp();
     $this->clear_tables();
     Session::instance()->destroy();
     Session::instance()->create();
 }
开发者ID:ready4god2513,项目名称:Journal,代码行数:7,代码来源:base_test_case.php

示例4: setUp

 function setUp()
 {
     // @todo mock the tokenizer
     $this->proc = new Elgg_Ecml_Processor(new Elgg_Ecml_Tokenizer());
     elgg_register_plugin_hook_handler('view', 'output/text', 'ecml_process_view');
     parent::setUp();
 }
开发者ID:lorea,项目名称:Hydra-dev,代码行数:7,代码来源:Elgg_Ecml_ProcessorTest.php

示例5: setUp

 function setUp()
 {
     $this->_clean_up();
     parent::setUp();
     debug_mock::init($this);
     $this->object =& new phpbb_user();
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:7,代码来源:phpbb_user_test.class.php

示例6: setUp

 /**
  * Set up
  * Initializes Config and Webapp objects
  */
 function setUp()
 {
     $config = Config::getInstance();
     $webapp = Webapp::getInstance();
     $crawler = Crawler::getInstance();
     parent::setUp();
 }
开发者ID:prop7,项目名称:thinktank,代码行数:11,代码来源:class.ThinkTankBasicUnitTestCase.php

示例7: setUp

 public function setUp()
 {
     parent::setUp();
     Piwik::createConfigObject();
     Piwik_Config::getInstance()->setTestEnvironment();
     Piwik_DataTable_Manager::getInstance()->deleteAll();
 }
开发者ID:nnnnathann,项目名称:piwik,代码行数:7,代码来源:Array.test.php

示例8: setUp

 function setUp()
 {
     parent::setUp();
     $config = new lmbSet(array('default_profile' => 'foo_profile', 'foo_profile' => array('type' => 'fckeditor', 'baz' => 42), 'bar_profile' => array('type' => 'tinymce', 'baz' => 111)));
     lmbToolkit::instance()->setConf('wysiwyg', $config);
     $this->_helper = new lmbWysiwygConfigurationHelper();
 }
开发者ID:r-kitaev,项目名称:limb,代码行数:7,代码来源:lmbWysiwygConfigurationHelperTest.class.php

示例9: setUp

 function setUp()
 {
     parent::setUp();
     $this->conn = lmbToolkit::instance()->getDefaultDbConnection();
     $this->db = new lmbSimpleDb($this->conn);
     $this->_cleanUp();
 }
开发者ID:snowjobgit,项目名称:limb,代码行数:7,代码来源:lmbCmsTestCase.class.php

示例10: __construct

 public function __construct()
 {
     parent::setUp();
     $this->mdu = new BabyModule();
     $this->mdu->baby = new \Appserver\Mdu\Models\BabyModel();
     $this->mdu->family = new \Appserver\Mdu\Models\FamilyModel();
     $this->mdu->devices = new \Appserver\Mdu\Models\DevicesModel();
 }
开发者ID:nicklos17,项目名称:appserver,代码行数:8,代码来源:BabyModuleTest.php

示例11: setUp

 public function setUp()
 {
     parent::setUp();
     if (is_null($this->selenium)) {
         $this->selenium = new SimpleSeleniumRemoteControl($this->browser, $this->browserUrl, $this->host, $this->port, $this->timeout);
         $this->selenium->start();
     }
 }
开发者ID:googlecode-mirror,项目名称:bulldoc,代码行数:8,代码来源:selenium.php

示例12: setUp

 function setUp()
 {
     parent::setUp();
     $this->wrapped_locator = new MockFileLocator();
     $this->locator = new lmbCachingFileLocator($this->wrapped_locator, LIMB_VAR_DIR);
     $this->locator->flushCache();
     $this->cache_file = $this->locator->getCacheFile();
 }
开发者ID:anykey84,项目名称:YaBackup,代码行数:8,代码来源:lmbCachingFileLocatorTest.class.php

示例13: setUp

 /**
  * Sets up the test class
  */
 public function setUp() {
     global $CFG;
     parent::setUp();
     // We need to disable these if they are enabled to that we can predict
     // the output.
     $CFG->cssoptimiserstats = false;
     $CFG->cssoptimiserpretty = false;
 }
开发者ID:nutanrajmalanai,项目名称:moodle,代码行数:11,代码来源:testcsslib.php

示例14: setUp

 function setUp()
 {
     parent::setUp();
     $this->conn = lmbToolkit::instance()->getDefaultDbConnection();
     $dir_for_tests = lmb_var_dir() . '/constructor/';
     $this->dir_for_test_case = $dir_for_tests . '/' . get_class($this);
     lmbFs::mkdir($this->dir_for_test_case);
 }
开发者ID:snowjobgit,项目名称:limb,代码行数:8,代码来源:lmbConstructorUnitTestCase.class.php

示例15: setUp

 function setUp()
 {
     parent::setUp();
     $this->_toolkit = lmbToolkit::save();
     $this->_input_stream_parser = new MockInputStreamParser();
     $this->_toolkit->setInputStreamParser($this->_input_stream_parser);
     $_SERVER['REQUEST_METHOD'] = null;
     $_POST = array();
 }
开发者ID:knevcher,项目名称:limb,代码行数:9,代码来源:lmbHttpRequestTest.class.php


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