本文整理汇总了PHP中ezpTestCase::setUp方法的典型用法代码示例。如果您正苦于以下问题:PHP ezpTestCase::setUp方法的具体用法?PHP ezpTestCase::setUp怎么用?PHP ezpTestCase::setUp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ezpTestCase
的用法示例。
在下文中一共展示了ezpTestCase::setUp方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
public function setUp()
{
parent::setUp();
$_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (iPhone; CPU iPhone OS 5_0_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A405 Safari/7534.48.3';
$_SERVER['HTTP_ACCEPT'] = 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';
}
示例2: setUp
public function setUp()
{
parent::setUp();
$_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (iPhone; CPU iPhone OS 5_0_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A405 Safari/7534.48.3';
$_SERVER['HTTP_ACCEPT'] = 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';
$this->mobileDeviceDetect = $this->getMock('ezpMobileDeviceRegexpFilter', null);
}
示例3: setUp
public function setUp()
{
parent::setUp();
ezpEvent::resetInstance();
ezpINIHelper::setINISetting('site.ini', 'Event', 'Listeners', array('test/notify@ezpEventTest::helperNotify', 'test/filter@ezpEventTest::helperFilterNotNull'));
$this->event = ezpEvent::getInstance();
}
示例4: setUp
public function setUp()
{
parent::setUp();
file_exists($this->rootDir) or @mkdir($this->rootDir, 0777, true);
file_exists($this->rootDir . 'a/b/c/') or @mkdir($this->rootDir . 'a/b/c/', 0777, true);
touch($this->rootDir . 'a/fileA');
touch($this->rootDir . 'a/b/fileB');
}
示例5: setUp
public function setUp()
{
parent::setUp();
$_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (iPhone; CPU iPhone OS 5_0_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A405 Safari/7534.48.3';
$_SERVER['HTTP_ACCEPT'] = 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';
// Enable mobile device detection
ezpINIHelper::setINISetting('site.ini', 'SiteAccessSettings', 'DetectMobileDevice', 'enabled');
$this->mobileDeviceDetect = $this->getMock('ezpMobileDeviceDetect', null, array($this->getMock('ezpMobileDeviceRegexpFilter', null)));
}
示例6: setUp
public function setUp()
{
parent::setUp();
$this->fileDir = dirname(__FILE__) . "/data";
$this->file = "{$this->fileDir}/file.txt";
$this->destFile = "{$this->fileDir}/file2.txt";
$this->content = file_get_contents($this->file);
// Disabling PHP E_Warning conversion to exceptions
$this->warningEnabledOrig = PHPUnit_Framework_Error_Warning::$enabled;
PHPUnit_Framework_Error_Warning::$enabled = false;
}
示例7: setUp
public function setUp()
{
parent::setUp();
// Backup previous instance of eZSys (if any) and reset it
$this->oldSysInstance = eZSys::instance();
eZSys::setInstance();
// Set the RequestURI to a known value so that eZSys::requestURI()
// returns something known and useful.
$this->queryString = "?foo=bar&this=that";
eZSys::setServerVariable("REQUEST_URI", "/all/work/and/no/sleep/makes/(ole)/a/(dull)/boy{$this->queryString}");
eZSys::init();
}
示例8: setUp
public function setUp()
{
parent::setUp();
// Setup default settings, change these in each test when needed
ezpINIHelper::setINISetting('site.ini', 'MailSettings', 'Transport', 'SMTP');
ezpINIHelper::setINISetting('site.ini', 'MailSettings', 'TransportServer', 'smtp.ez.no');
ezpINIHelper::setINISetting('site.ini', 'MailSettings', 'TransportPort', 25);
ezpINIHelper::setINISetting('site.ini', 'MailSettings', 'TransportUser', 'ezcomponents@mail.ez.no');
ezpINIHelper::setINISetting('site.ini', 'MailSettings', 'TransportPassword', 'ezcomponents');
ezpINIHelper::setINISetting('site.ini', 'MailSettings', 'AdminEmail', $this->adminEmail);
ezpINIHelper::setINISetting('site.ini', 'MailSettings', 'EmailSender', 'ezp-unittests-01@ez.no');
ezpINIHelper::setINISetting('site.ini', 'MailSettings', 'EmailReplyTo', 'ezp-unittests-01@ez.no');
ezpINIHelper::setINISetting('site.ini', 'MailSettings', 'DebugSending', 'disabled');
ezpINIHelper::setINISetting('site.ini', 'MailSettings', 'DebugReceiverEmail', 'ezp-unittests-01@ez.no');
}
示例9: setUp
/**
* Sets up the database environment
*/
protected function setUp()
{
parent::setUp();
if (ezpTestRunner::dbPerTest()) {
$dsn = ezpTestRunner::dsn();
$this->sharedFixture = ezpTestDatabaseHelper::create($dsn);
if ($this->insertDefaultData === true) {
ezpTestDatabaseHelper::insertDefaultData($this->sharedFixture);
}
if (count($this->sqlFiles) > 0) {
ezpTestDatabaseHelper::insertSqlData($this->sharedFixture, $this->sqlFiles);
}
eZDB::setInstance($this->sharedFixture);
}
}
示例10: setUp
public function setUp()
{
parent::setUp();
// Setup default settings, change these in each test when needed
ezpINIHelper::setINISetting('site.ini', 'MailSettings', 'Transport', 'sendmail');
ezpINIHelper::setINISetting('site.ini', 'MailSettings', 'TransportServer', 'localhost');
ezpINIHelper::setINISetting('site.ini', 'MailSettings', 'TransportPort', 25);
ezpINIHelper::setINISetting('site.ini', 'MailSettings', 'TransportUser', '');
ezpINIHelper::setINISetting('site.ini', 'MailSettings', 'TransportPassword', '');
$ini = eZINI::instance('test_ezmail_plain.ini');
$adminEmail = $ini->variable('TestAccounts', 'AdminEmail');
ezpINIHelper::setINISetting('site.ini', 'MailSettings', 'AdminEmail', $adminEmail);
ezpINIHelper::setINISetting('site.ini', 'MailSettings', 'EmailSender', $adminEmail);
ezpINIHelper::setINISetting('site.ini', 'MailSettings', 'EmailReplyTo', $adminEmail);
ezpINIHelper::setINISetting('site.ini', 'MailSettings', 'DebugSending', 'disabled');
ezpINIHelper::setINISetting('site.ini', 'MailSettings', 'DebugReceiverEmail', $adminEmail);
}
示例11: setUp
public function setUp()
{
parent::setUp();
ezpINIHelper::setINISetting( "site.ini", "SiteAccessSettings", "MatchOrder", "host_uri" );
ezpINIHelper::setINISetting(
"site.ini",
"SiteAccessSettings",
"HostUriMatchMapItems",
array(
"www.example.com;abcd/foo;abcd_foo",
"www.example.com;abcdef/foo;abcdef_foo",
"www.example.com;abc/foo;abc_foo",
"www.example.com;abcdefg/foo;abcdefg_foo",
"www.example.com;abcde/foo;abcde_foo",
"www.example.com;abcd;abcd",
"www.example.com;abcdef;abcdef",
"www.example.com;abc;abc",
"www.example.com;abcdefg;abcdefg",
"www.example.com;abcde;abcde",
"www.example.com;admin;admin",
)
);
}
示例12: setUp
/**
* initialize the context
* @see tests/tests/lib/eztemplate/ezpTestCase#setUp()
*/
public function setUp()
{
parent::setUp();
$this->templateStringOperator=new eZTemplateStringOperator();
}
示例13: setUp
public function setUp()
{
$this->defaultTimezone = date_default_timezone_get();
date_default_timezone_set('Europe/Paris');
parent::setUp();
}
示例14: setUp
protected function setUp()
{
parent::setUp();
$GLOBALS['eZDebugEnabled'] = true;
}
示例15: setUp
public function setUp()
{
parent::setUp();
$this->imageIni = eZINI::instance('image.ini');
}