當前位置: 首頁>>代碼示例>>PHP>>正文


PHP WebTestCase類代碼示例

本文整理匯總了PHP中WebTestCase的典型用法代碼示例。如果您正苦於以下問題:PHP WebTestCase類的具體用法?PHP WebTestCase怎麽用?PHP WebTestCase使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了WebTestCase類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setUp

 /**
  * @see WebTestCase::setUp()
  */
 protected function setUp()
 {
     parent::setUp();
     $this->editorBasePath = $this->baseUrl . '/index.php/lucene-test/editor/';
 }
開發者ID:utslibrary,項目名稱:ojs,代碼行數:8,代碼來源:FunctionalEditingBaseTestCase.inc.php

示例2: tearDown

 protected function tearDown()
 {
     parent::tearDown();
     $pluginSettingsDao = DAORegistry::getDAO('PluginSettingsDAO');
     /* @var $pluginSettingsDao PluginSettingsDAO */
     $pluginSettingsDao->_getCache(0, 'luceneplugin')->flush();
 }
開發者ID:mariojp,項目名稱:ojs,代碼行數:7,代碼來源:FunctionalLucenePluginBaseTestCase.inc.php

示例3: setUp

 protected function setUp()
 {
     parent::setUp();
     $election = Election::model()->findByPk(1);
     $election->status = Election::STATUS_REGISTRATION;
     $election->save(false);
 }
開發者ID:vasiliy-pdk,項目名稱:aes,代碼行數:7,代碼來源:ElectionRegistrationTest.php

示例4: setUp

 /**
  * BACKGROUND:
  *   GIVEN I enabled the "most read articles" block plugin
  *     AND I enabled a metric providing plugin.
  *
  * @see PKPTestCase::setUp()
  */
 protected function setUp()
 {
     parent::setUp();
     // Enable the "most read articles" plugin.
     $pluginSettingsDao = DAORegistry::getDAO('PluginSettingsDAO');
     /* @var $pluginSettingsDao PluginSettingsDAO */
     $pluginSettingsDao->updateSetting(2, 'MostReadBlockPlugin', 'enabled', true);
     $pluginSettingsDao->updateSetting(2, 'MostReadBlockPlugin', 'context', BLOCK_CONTEXT_SIDEBAR);
     $pluginSettingsDao->updateSetting(2, 'MostReadBlockPlugin', 'seq', 1);
     // Enable a metric-providing plugin.
     $pluginSettingsDao->updateSetting(0, 'OasPlugin', 'enabled', true);
     // Generate test metric data.
     $dates = array(date('Ymd', strtotime('-15 days')), date('Ymd', strtotime('-45 days')), date('Ymd', strtotime('-2 years')));
     $record = array('load_id' => 'most-read-test', 'assoc_type' => ASSOC_TYPE_GALLEY, 'metric_type' => 'oas::counter');
     $metricsDao = DAORegistry::getDAO('MetricsDAO');
     /* @var $metricsDao MetricsDAO */
     foreach ($dates as $date) {
         $record['day'] = $date;
         foreach (array('4' => 5, '6' => 10) as $assocId => $metric) {
             $record['assoc_id'] = $assocId;
             $record['metric'] = $metric;
             $metricsDao->insertRecord($record);
         }
     }
 }
開發者ID:pkp,項目名稱:ojs,代碼行數:32,代碼來源:FunctionalMostReadBlockPluginTestCase.php

示例5: setUp

 public function setUp()
 {
     if (self::$fixturesLoaded) {
         return;
     }
     $this->loadFixtures(array('AppBundle\\DataFixtures\\PHPCR\\LoadStaticPageData', 'AppBundle\\DataFixtures\\PHPCR\\LoadMenuData', 'AppBundle\\DataFixtures\\PHPCR\\LoadRoutingData', 'AppBundle\\DataFixtures\\PHPCR\\LoadSimpleCmsData'), null, 'doctrine_phpcr');
     self::$fixturesLoaded = true;
 }
開發者ID:revollat,項目名稱:cmf-sandbox,代碼行數:8,代碼來源:WebTestCase.php

示例6: setUp

 public function setUp()
 {
     parent::setUp();
     $this->pool = $this->getContainer()->get('sonata.admin.pool');
     $this->router = $this->getContainer()->get('router');
     $this->client = $this->createClientAuthenticated();
     $this->dm = $this->getContainer()->get('doctrine_phpcr.odm.default_document_manager');
 }
開發者ID:revollat,項目名稱:cmf-sandbox,代碼行數:8,代碼來源:AdminTest.php

示例7: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->truncateTables();
     $appLogger = $this->appLogger = Yii::app()->getComponent('log')->routes['info_log'];
     $logFilePath = $this->logFilePath = $appLogger->logPath . '/' . $appLogger->logFile;
     $this->deleteFile($logFilePath);
     $identifiersImagesDirPath = $this->identifiersImagesDirPath = Yii::getPathOfAlias('frontend.www') . Yii::app()->getModule('personIdentifier')->imagesDir;
     //        self::removeDirectory($identifiersImagesDirPath);
 }
開發者ID:vasiliy-pdk,項目名稱:aes,代碼行數:10,代碼來源:RegistrationTest.php

示例8: setUpBeforeClass

 /**
  * @copydoc PHPUnit_Framework_TestCase::setUpBeforeClass()
  */
 public static function setUpBeforeClass()
 {
     // Retrieve and check configuration.
     self::$baseUrl = getenv('BASEURL');
     self::$timeout = (int) getenv('TIMEOUT');
     if (!self::$timeout) {
         self::$timeout = 30;
     }
     // Default 30 seconds
     parent::setUpBeforeClass();
 }
開發者ID:doana,項目名稱:pkp-lib,代碼行數:14,代碼來源:WebTestCase.inc.php

示例9: setUp

 protected function setUp()
 {
     parent::setUp();
     //$this->setAutoStop(false);
     $this->start();
     $this->open('');
     // login
     $this->clickAndWait('link=Login');
     $this->type('name=LoginForm[username]', 'admin');
     $this->click("//input[@value='Login']");
     $this->waitForTextPresent('Password cannot be blank.');
     $this->type('name=LoginForm[password]', 'test');
     $this->clickAndWait("//input[@value='Login']");
     $this->clickAndWait('link=Users');
 }
開發者ID:stpncpe,項目名稱:cbdbx,代碼行數:15,代碼來源:UserValidationTest.php

示例10: database

 function __construct()
 {
     parent::__construct();
     global $configure;
     $this->url = $configure['urlwebsite'];
     $this->cdashpro = false;
     if (isset($configure['cdashpro']) && $configure['cdashpro'] == '1') {
         $this->cdashpro = true;
     }
     global $db;
     $this->db =& new database($db['type']);
     $this->db->setDb($db['name']);
     $this->db->setHost($db['host']);
     $this->db->setPort($db['port']);
     $this->db->setUser($db['login']);
     $this->db->setPassword($db['pwd']);
     global $cdashpath;
     $this->logfilename = $cdashpath . "/backup/cdash.log";
 }
開發者ID:rpshaw,項目名稱:CDash,代碼行數:19,代碼來源:kw_web_tester.php

示例11: __construct

 public function __construct()
 {
     parent::__construct();
     global $configure;
     $this->url = $configure['urlwebsite'];
     $this->cdashpro = false;
     if (isset($configure['cdashpro']) && $configure['cdashpro'] == '1') {
         $this->cdashpro = true;
     }
     global $db;
     $this->db = new database($db['type']);
     $this->db->setDb($db['name']);
     $this->db->setHost($db['host']);
     $this->db->setPort($db['port']);
     $this->db->setUser($db['login']);
     $this->db->setPassword($db['pwd']);
     global $CDASH_LOG_FILE, $cdashpath;
     $this->logfilename = $CDASH_LOG_FILE;
     $this->configfilename = $cdashpath . '/config/config.local.php';
 }
開發者ID:kitware,項目名稱:cdash,代碼行數:20,代碼來源:kw_web_tester.php

示例12: onNotSuccessfulTest

 /**
  * @see PHPUnit_Extensions_SeleniumTestCase::onNotSuccessfulTest()
  */
 protected function onNotSuccessfulTest($e)
 {
     // Restart the Selenium session to avoid overlay of
     // error messages.
     $this->start();
     parent::onNotSuccessfulTest($e);
 }
開發者ID:mosvits,項目名稱:ojs,代碼行數:10,代碼來源:FunctionalDoiPubIdPluginTestCase.php

示例13: testCreateJournalLogin

 /**
  * Prepare for tests.
  */
 function testCreateJournalLogin()
 {
     parent::logIn('admin', 'admin');
 }
開發者ID:DSoft29,項目名稱:ojs,代碼行數:7,代碼來源:20-CreateJournalTest.php

示例14: setUp

 protected function setUp()
 {
     parent::setUp();
 }
開發者ID:jameshalsall,項目名稱:Manager,代碼行數:4,代碼來源:CustomerTest.php

示例15: tearDown

 protected function tearDown()
 {
     parent::tearDown();
     $this->deleteTmpDir('ORM');
 }
開發者ID:soeren-helbig,項目名稱:FOSElasticaBundle,代碼行數:5,代碼來源:IndexableCallbackTest.php


注:本文中的WebTestCase類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。