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


PHP PHPUnit_Extensions_SeleniumTestCase::__construct方法代码示例

本文整理汇总了PHP中PHPUnit_Extensions_SeleniumTestCase::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPUnit_Extensions_SeleniumTestCase::__construct方法的具体用法?PHP PHPUnit_Extensions_SeleniumTestCase::__construct怎么用?PHP PHPUnit_Extensions_SeleniumTestCase::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PHPUnit_Extensions_SeleniumTestCase的用法示例。


在下文中一共展示了PHPUnit_Extensions_SeleniumTestCase::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

 /**
  * Constructor
  *
  * @param null|string $name
  * @param array $data
  * @param string $dataName
  * @param array $browser
  * @return void
  */
 function __construct($name = NULL, array $data = array(), $dataName = '', array $browser = array())
 {
     parent::__construct($name, $data, $dataName, $browser);
     if (defined('CC_SELENIUM_OPT_CaptureScreenshotOnFailure')) {
         $this->captureScreenshotOnFailure = CC_SELENIUM_OPT_CaptureScreenshotOnFailure;
         $this->screenshotPath = CC_SELENIUM_OPT_ScreenshotPath;
         $this->screenshotUrl = CC_SELENIUM_OPT_ScreenshotUrl;
     }
     $this->setBrowser("*firefox");
     $this->setBrowserUrl(CC_SELENIUM_OPT_URL);
 }
开发者ID:opensolutions,项目名称:oss-framework,代码行数:20,代码来源:SeleniumTestCase.php

示例2: __construct

 public function __construct($name = NULL, array $data = array(), $dataName = '', array $browser = array())
 {
     $this->bootstrap = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini');
     $seleniumConfig = $this->bootstrap->getOption('selenium');
     $browser['host'] = $seleniumConfig['host'];
     $browser['port'] = (int) $seleniumConfig['port'];
     $browser['timeout'] = (int) $seleniumConfig['timeout'];
     parent::__construct($name, $data, $dataName);
     $this->setupSpecificBrowser($browser);
     return $this;
 }
开发者ID:minishri9,项目名称:dash,代码行数:11,代码来源:EnvironmentGridTest.php

示例3: __construct

 public function __construct($name = NULL, array $data = array(), $dataName = '', array $browser = array())
 {
     $this->testId = md5(uniqid(rand(), TRUE));
     if (Kwf_Registry::get('config')->server->testBrowser) {
         $browsers = Kwf_Registry::get('config')->server->testBrowser->toArray();
         if (count($browsers) != 1) {
             throw new Kwf_Exception("only a single browser is supported");
         }
         $browser = reset($browsers);
         $browser = array('host' => $browser['host'], 'port' => (int) $browser['port'], 'browser' => $browser['browser']);
     }
     parent::__construct($name, $data, $dataName, $browser);
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:13,代码来源:SeleniumTestCase.php

示例4: __construct

 /**
  *  Constructor.
  *
  *  Because we are overriding the parent class constructor, we
  *  need to show the same arguments as exist in the constructor of
  *  PHPUnit_Framework_TestCase, since
  *  PHPUnit_Framework_TestSuite::createTest() creates a
  *  ReflectionClass of the Test class and checks the constructor
  *  of that class to decide how to set up the test.
  *
  * @param string $name
  * @param array $data
  * @param string $dataName
  * @param array $browser
  */
 public function __construct($name = NULL, array $data = array(), $dataName = '', array $browser = array())
 {
     parent::__construct($name, $data, $dataName, $browser);
     $this->loggedInAs = NULL;
     $this->settings = new CiviSeleniumSettings();
     if (property_exists($this->settings, 'serverStartupTimeOut') && $this->settings->serverStartupTimeOut) {
         global $CiviSeleniumTestCase_polled;
         if (!$CiviSeleniumTestCase_polled) {
             $CiviSeleniumTestCase_polled = TRUE;
             CRM_Utils_Network::waitForServiceStartup($this->drivers[0]->getHost(), $this->drivers[0]->getPort(), $this->settings->serverStartupTimeOut);
         }
     }
     // autoload
     require_once 'CRM/Core/ClassLoader.php';
     CRM_Core_ClassLoader::singleton()->register();
     // also initialize a connection to the db
     // FIXME: not necessary for most tests, consider moving into functions that need this
     $config = CRM_Core_Config::singleton();
 }
开发者ID:scardinius,项目名称:civicrm-core,代码行数:34,代码来源:CiviSeleniumTestCase.php

示例5: __construct

 public function __construct($name = null, array $data = array(), $data_name = '')
 {
     parent::__construct($name, $data, $data_name);
     $this->config = new TestConfig($this, dirname(__FILE__) . '/config.php');
 }
开发者ID:nburka,项目名称:blorgy,代码行数:5,代码来源:SeleniumTestCase.php

示例6: __construct

 public function __construct($name = NULL, array $data = array(), $dataName = '', array $browser = array())
 {
     parent::__construct($name, $data, $dataName, $browser);
     $this->scenario = new PHPUnit_Extensions_Story_Scenario($this);
 }
开发者ID:arjenschol,项目名称:phpunit,代码行数:5,代码来源:SeleniumTestCase.php

示例7: __construct

 public function __construct($name = NULL, array $data = array(), $dataName = '', array $browser = array()) {
   parent::__construct($name, $data, $dataName, $browser);
   $this->fixtureLoader = new OBM_FixtureLoader();
   $this->dataset = new OBM_Database_CsvDataSet(';');
 }
开发者ID:Kervinou,项目名称:OBM,代码行数:5,代码来源:TestsHelper.php

示例8: __construct

 /**
  * Constructor
  *
  * @param   string  $name 
  * @param   array   $data 
  * @param   string  $dataName 
  */
 public function __construct($name = NULL, array $data = array(), $dataName = '')
 {
     parent::__construct($name, $data, $dataName);
     $this->CI =& get_instance();
     log_message('debug', get_class($this) . ' WetbTest initialized');
 }
开发者ID:TheOne1006,项目名称:phpunit_for_ci_2.1.x,代码行数:13,代码来源:WEBTest.php

示例9: __construct

 /**
  * Constructs a test case with the given name and browser to test execution
  *
  * @param  string $name Test case name (by default = null)
  * @param  array  $data Test case data array (PHPUnit ONLY) (by default = array())
  * @param  string $dataName Name of Data set (PHPUnit ONLY) (by default = '')
  * @param  array  $browser Array of browser configuration settings: 'name', 'browser', 'host', 'port', 'timeout',
  * 'httpTimeout' (by default = array())
  *
  * @throws InvalidArgumentException
  */
 public function __construct($name = null, array $data = array(), $dataName = '', array $browser = array())
 {
     $this->_testConfig = Mage_Selenium_TestConfiguration::initInstance();
     $this->_dataHelper = $this->_testConfig->getDataHelper();
     $this->_dataGenerator = $this->_testConfig->getDataGenerator();
     $this->_applicationHelper = $this->_testConfig->getApplicationHelper();
     $this->_pageHelper = $this->_testConfig->getPageHelper($this, $this->_applicationHelper);
     $this->_uimapHelper = $this->_testConfig->getUimapHelper();
     if ($name !== null) {
         $this->name = $name;
     }
     $this->data = $data;
     $this->dataName = $dataName;
     $path = 'browsers/default/browserTimeoutPeriod';
     $this->_browserTimeoutPeriod = !is_bool($this->_testConfig->getConfigValue($path)) ? $this->_testConfig->getConfigValue($path) : $this->_browserTimeoutPeriod;
     parent::__construct($name, $data, $dataName, $browser);
 }
开发者ID:signativa,项目名称:Magento-Test-Automation-Framework,代码行数:28,代码来源:TestCase.php

示例10: __construct

 /**
  * Constructs a test case with the given name and browser to test execution
  *
  * @param  string $name Test case name(by default = null)
  * @param  array  $data Test case data array(by default = array())
  * @param  string $dataName Name of Data set(by default = '')
  */
 public function __construct($name = null, array $data = array(), $dataName = '')
 {
     $this->_testConfig = Mage_Selenium_TestConfiguration::getInstance();
     $this->_configHelper = $this->_testConfig->getHelper('config');
     $this->_uimapHelper = $this->_testConfig->getHelper('uimap');
     $this->_dataHelper = $this->_testConfig->getHelper('data');
     $this->_paramsHelper = $this->_testConfig->getHelper('params');
     $this->_dataGeneratorHelper = $this->_testConfig->getHelper('dataGenerator');
     $this->frameworkConfig = $this->_configHelper->getConfigFramework();
     parent::__construct($name, $data, $dataName);
     $this->captureScreenshotOnFailure = $this->frameworkConfig['captureScreenshotOnFailure'];
     $this->_saveHtmlPageOnFailure = $this->frameworkConfig['saveHtmlPageOnFailure'];
     $this->coverageScriptUrl = $this->frameworkConfig['coverageScriptUrl'];
     $this->screenshotPath = $this->screenshotUrl = $this->getDefaultScreenshotPath();
 }
开发者ID:venkateshcontus,项目名称:taf,代码行数:22,代码来源:TestCase.php

示例11: __construct

 public function __construct($name = null, array $data = array(), $data_name = '')
 {
     parent::__construct($name, $data, $data_name);
     $this->config = $this->getConfig();
 }
开发者ID:charleswaddell,项目名称:turing,代码行数:5,代码来源:TuringSeleniumTest.php

示例12:

 function __construct($name)
 {
     parent::__construct($name);
     $this->configure();
 }
开发者ID:railfuture,项目名称:tiki-website,代码行数:5,代码来源:TikiSeleniumTestCase.php

示例13: __construct

 /**
  * Constructor
  *
  * @access public
  * @see    ____func_see____
  * @since  1.0.0
  */
 public function __construct($name = NULL, array $data = array(), $dataName = '', array $browser = array())
 {
     $this->browserName = isset($browser['name']) ? $browser['name'] : 'unknown';
     /*
     $this->coverageScriptUrl = defined('SELENIUM_COVERAGE_URL')
         ? SELENIUM_COVERAGE_URL . '/phpunit_coverage.php'
         : SELENIUM_SOURCE_URL . '/phpunit_coverage.php';
     */
     if (defined('SELENIUM_SCREENSHOTS_PATH') && defined('SELENIUM_SCREENSHOTS_URL')) {
         $this->captureScreenshotOnFailure = true;
         $this->screenshotPath = SELENIUM_SCREENSHOTS_PATH;
         $this->screenshotUrl = SELENIUM_SCREENSHOTS_URL;
     }
     if (defined('W3C_VALIDATION')) {
         $this->validatePage = true;
     }
     parent::__construct($name, $data, $dataName, $browser);
     $this->testConfig = $this->getTestConfigOptions();
 }
开发者ID:kingsj,项目名称:core,代码行数:26,代码来源:SeleniumTestCase.php

示例14: __construct

 /**
  * Constructs a test case with the given name and browser to test execution
  *
  * @param  string $name Test case name(by default = null)
  * @param  array  $data Test case data array(by default = array())
  * @param  string $dataName Name of Data set(by default = '')
  * @param  array  $browser Array of browser configuration settings: 'name', 'browser', 'host', 'port', 'timeout',
  * 'httpTimeout' (by default = array())
  */
 public function __construct($name = null, array $data = array(), $dataName = '', array $browser = array())
 {
     $this->_testConfig = Mage_Selenium_TestConfiguration::getInstance();
     $this->_configHelper = $this->_testConfig->getHelper('config');
     $this->_uimapHelper = $this->_testConfig->getHelper('uimap');
     $this->_dataHelper = $this->_testConfig->getHelper('data');
     $this->_paramsHelper = $this->_testConfig->getHelper('params');
     $this->_dataGeneratorHelper = $this->_testConfig->getHelper('dataGenerator');
     parent::__construct($name, $data, $dataName, $browser);
     if (isset($browser['timeout'])) {
         $this->_browserTimeoutPeriod = $browser['timeout'] * 1000;
     }
     $config = $this->_configHelper->getConfigFramework();
     $this->captureScreenshotOnFailure = $config['captureScreenshotOnFailure'];
     $this->screenshotPath = $this->screenshotUrl = $this->_configHelper->getScreenshotDir();
     $this->_saveHtmlPageOnFailure = $config['saveHtmlPageOnFailure'];
     $this->coverageScriptUrl = $config['coverageScriptUrl'];
 }
开发者ID:ridhoq,项目名称:mxpi-twitter,代码行数:27,代码来源:TestCase.php

示例15: __construct

 /**
  * @param  string $name
  * @param  array  $data
  * @param  string $dataName
  * @param  array  $browser
  * @throws InvalidArgumentException
  */
 public final function __construct($name = NULL, array $data = array(), $dataName = '', array $browser = array())
 {
     parent::__construct($name, $data, $dataName, $browser);
     $this->init();
     $this->loadSeleneseFiles();
     // $this->verifySetup();
     // SpecialCentralNoticeTestCase::$seleneseDirectory = $this->unitTestBasePath . '/selenium/selenese';
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:15,代码来源:ExtensionsSeleniumTestCase.php


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