Esempio n. 1
0
 public function __construct(ModuleContainer $moduleContainer, $config)
 {
     // prepare build name for sauceLabs
     if (!empty($_SERVER["JENKINS_BUILD_NUMBER"])) {
         $config["build"] = $_SERVER["JENKINS_BUILD_NUMBER"];
     }
     parent::__construct($moduleContainer, $config);
 }
Esempio n. 2
0
 /**
  * Constructor.
  *
  * @since 1.0.0
  *
  * @access public
  * @param array $config Configuration array.
  */
 public function __construct($config = null)
 {
     // remove "url" field from required fields because it will be automatically populated using home_url() function
     $url_index = array_search('url', $this->requiredFields);
     if (!empty($url_index)) {
         unset($this->requiredFields[$url_index]);
     }
     // add home url to the config
     $this->config['url'] = home_url();
     // call parent constructor
     parent::__construct($config);
     // add pahntomjs path if needed
     if ('phantomjs' == $this->config['browser']) {
         $phantomjs_binary = WPCC_ABSPATH . '/node_modules/phantomjs/bin/phantomjs';
         if (!isset($this->config['capabilities'])) {
             $this->config['capabilities'] = array('phantomjs.binary.path' => $phantomjs_binary);
         } elseif (empty($this->config['capabilities']['phantomjs.binary.path'])) {
             $this->config['capabilities']['phantomjs.binary.path'] = $phantomjs_binary;
         }
     }
 }
Esempio n. 3
0
 /**
  * Constructor.
  *
  * @since 1.0.0
  *
  * @access public
  * @param array $config Configuration array.
  */
 public function __construct($config = null)
 {
     $this->requiredFields[] = 'username';
     $this->requiredFields[] = 'access_key';
     parent::__construct($config);
 }