当前位置: 首页>>代码示例>>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;未经允许,请勿转载。