• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP WebTestCase类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中WebTestCase的典型用法代码示例。如果您正苦于以下问题:PHP WebTestCase类的具体用法?PHP WebTestCase怎么用?PHP WebTestCase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了WebTestCase类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: __construct

 public function __construct()
 {
     parent::WebTestCase();
     $this->ci =& get_instance();
 }
开发者ID:arunoda-susiripala,项目名称:Code51,代码行数:5,代码来源:test.php


示例3: 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


示例4: 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


示例5: 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


示例6: 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


示例7: 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


示例8: 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


示例9: 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


示例10: 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


示例11: 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


示例12: __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


示例13: 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


示例14: testCreateJournalLogin

 /**
  * Prepare for tests.
  */
 function testCreateJournalLogin()
 {
     parent::logIn('admin', 'admin');
 }
开发者ID:DSoft29,项目名称:ojs,代码行数:7,代码来源:20-CreateJournalTest.php


示例15: setUp

 protected function setUp()
 {
     parent::setUp();
 }
开发者ID:jameshalsall,项目名称:Manager,代码行数:4,代码来源:CustomerTest.php


示例16: tearDown

 protected function tearDown()
 {
     parent::tearDown();
     $this->deleteTmpDir('ORM');
 }
开发者ID:soeren-helbig,项目名称:FOSElasticaBundle,代码行数:5,代码来源:IndexableCallbackTest.php


示例17: __construct

 public function __construct($name = null, array $data = array(), $dataName = '')
 {
     parent::__construct($name, $data, $dataName);
     $this->validationServiceAvailable = $this->isValidationServiceAvailable();
 }
开发者ID:ericpoe,项目名称:LiipFunctionalTestBundle,代码行数:5,代码来源:Html5WebTestCase.php


示例18: get

 function get($url, $parameters = NULL)
 {
     $parts = array();
     if (preg_match('#([\\w-]*):([\\w-]+|[^/]|$)((:(.*))*)#', $url, $parts) != 0 && $parts[1] != 'mailto') {
         list($zone_name, $vars, $hash) = page_link_decode($url);
         $real_url = _build_url($vars, $zone_name, NULL, false, false, false, $hash);
         $ret = parent::get($real_url, $parameters);
     } else {
         $ret = parent::get($url, $parameters);
     }
     // Save, so we can run validation on it later
     $path = get_file_base() . '/_tests/html_dump/' . get_class($this);
     if (!file_exists($path)) {
         mkdir($path, 0777);
     }
     $content = $this->_browser->getContent();
     $outfile = fopen($path . '/' . url_to_filename($url) . '.htm', 'wb');
     fwrite($outfile, $content);
     fclose($outfile);
     sync_file($path . '/' . url_to_filename($url) . '.htm');
     fix_permissions($path . '/' . url_to_filename($url) . '.htm');
     // Save the text so we can run through Word's grammar checker
     $text_content = $content;
     $text_content = preg_replace('#<[^>]* title="([^"]+)"<[^>]*>#U', '\\1', $text_content);
     $text_content = preg_replace('#<[^>]* alt="([^"]+)"<[^>]*>#U', '\\1', $text_content);
     $text_content = preg_replace('#<style[^>]*>.*</style>#Us', '', $text_content);
     $text_content = preg_replace('#<script[^>]*>.*</script>#Us', '', $text_content);
     $text_content = preg_replace('#<[^>]*>#U', '', $text_content);
     $text_content = preg_replace('#\\s\\s+#', '. ', $text_content);
     $text_content = str_replace('&ndash;', '-', $text_content);
     $text_content = str_replace('&mdash;', '-', $text_content);
     $text_content = str_replace('&hellip;', '...', $text_content);
     $text_content = @html_entity_decode($text_content, ENT_QUOTES);
     $outfile = fopen($path . '/' . url_to_filename($url) . '.txt', 'wb');
     fwrite($outfile, $text_content);
     fclose($outfile);
     return $ret;
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:38,代码来源:ocp_test_case.php


示例19: __construct

 public function __construct()
 {
     parent::__construct('PHP_Merchant_Paypal_Express_Checkout Remote Unit Tests');
 }
开发者ID:nikitanaumov,项目名称:WP-e-Commerce,代码行数:4,代码来源:paypal-express-checkout.php


示例20: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->productFixture = $this->manager->loadFixture('catalog/product');
 }
开发者ID:jameshalsall,项目名称:Manager,代码行数:5,代码来源:ProductTest.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP WebUtils类代码示例发布时间:2022-05-23
下一篇:
PHP WebRequest类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap