本文整理汇总了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);
}
示例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);
}
示例3: setUp
public function setUp()
{
parent::setUp();
$this->clear_tables();
Session::instance()->destroy();
Session::instance()->create();
}
示例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();
}
示例5: setUp
function setUp()
{
$this->_clean_up();
parent::setUp();
debug_mock::init($this);
$this->object =& new phpbb_user();
}
示例6: setUp
/**
* Set up
* Initializes Config and Webapp objects
*/
function setUp()
{
$config = Config::getInstance();
$webapp = Webapp::getInstance();
$crawler = Crawler::getInstance();
parent::setUp();
}
示例7: setUp
public function setUp()
{
parent::setUp();
Piwik::createConfigObject();
Piwik_Config::getInstance()->setTestEnvironment();
Piwik_DataTable_Manager::getInstance()->deleteAll();
}
示例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();
}
示例9: setUp
function setUp()
{
parent::setUp();
$this->conn = lmbToolkit::instance()->getDefaultDbConnection();
$this->db = new lmbSimpleDb($this->conn);
$this->_cleanUp();
}
示例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();
}
示例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();
}
}
示例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();
}
示例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;
}
示例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);
}
示例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();
}