本文整理汇总了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);
}
示例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;
}
示例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);
}
示例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();
}
示例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');
}
示例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);
}
示例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(';');
}
示例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');
}
示例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);
}
示例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();
}
示例11: __construct
public function __construct($name = null, array $data = array(), $data_name = '')
{
parent::__construct($name, $data, $data_name);
$this->config = $this->getConfig();
}
示例12:
function __construct($name)
{
parent::__construct($name);
$this->configure();
}
示例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();
}
示例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'];
}
示例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';
}