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


PHP ezpTestCase::setUp方法代码示例

本文整理汇总了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';
    }
开发者ID:nottavi,项目名称:ezpublish,代码行数:7,代码来源:ezpmobiledevicedetectfilter_test.php

示例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);
 }
开发者ID:nfrp,项目名称:ezpublish,代码行数:7,代码来源:ezpmobiledeviceregexpfilter_test.php

示例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();
 }
开发者ID:netbliss,项目名称:ezpublish,代码行数:7,代码来源:ezpevent_test.php

示例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');
 }
开发者ID:runelangseid,项目名称:ezpublish,代码行数:8,代码来源:ezdirinsideroot_test.php

示例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)));
 }
开发者ID:netbliss,项目名称:ezpublish,代码行数:9,代码来源:ezpmobiledevicedetect_test.php

示例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;
 }
开发者ID:CG77,项目名称:ezpublish-legacy,代码行数:11,代码来源:ezfilerename_test.php

示例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();
 }
开发者ID:brookinsconsulting,项目名称:ezecosystem,代码行数:12,代码来源:ezuri_regression.php

示例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');
 }
开发者ID:runelangseid,项目名称:ezpublish,代码行数:15,代码来源:ezmail_ezc_test.php

示例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);
     }
 }
开发者ID:brookinsconsulting,项目名称:ezecosystem,代码行数:18,代码来源:ezpdatabasetestcase.php

示例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);
 }
开发者ID:CG77,项目名称:ezpublish-legacy,代码行数:17,代码来源:ezmail_test.php

示例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",
         )
     );
 }
开发者ID:nottavi,项目名称:ezpublish,代码行数:23,代码来源:ezsiteaccessmatchhosturi_test.php

示例12: setUp

 /**
  * initialize the context
  * @see tests/tests/lib/eztemplate/ezpTestCase#setUp()
  */
 public function setUp()
 {
     parent::setUp();
     $this->templateStringOperator=new eZTemplateStringOperator();
 }
开发者ID:nottavi,项目名称:ezpublish,代码行数:9,代码来源:eztemplatestringoperator_regression.php

示例13: setUp

 public function setUp()
 {
     $this->defaultTimezone = date_default_timezone_get();
     date_default_timezone_set('Europe/Paris');
     parent::setUp();
 }
开发者ID:brookinsconsulting,项目名称:ezecosystem,代码行数:6,代码来源:ezlocale_regression.php

示例14: setUp

 protected function setUp()
 {
     parent::setUp();
     $GLOBALS['eZDebugEnabled'] = true;
 }
开发者ID:mugoweb,项目名称:ezpublish-legacy,代码行数:5,代码来源:ezdebug_regression.php

示例15: setUp

 public function setUp()
 {
     parent::setUp();
     $this->imageIni = eZINI::instance('image.ini');
 }
开发者ID:mugoweb,项目名称:ezpublish-legacy,代码行数:5,代码来源:ezimagemanager_test.php


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