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