當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。