From c1a8ffb08bf67b6d06ee9b8d51cf15b6369b89e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Thu, 19 Mar 2020 18:50:50 +0100 Subject: [PATCH 01/37] Fix namespace --- PHPUnit/Extensions/Selenium2TestCase.php | 29 ++++++++++++------------ 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase.php b/PHPUnit/Extensions/Selenium2TestCase.php index 95c35181..a99e8183 100644 --- a/PHPUnit/Extensions/Selenium2TestCase.php +++ b/PHPUnit/Extensions/Selenium2TestCase.php @@ -45,6 +45,7 @@ namespace PHPUnit\Extensions; use Exception; +use InvalidArgumentException; use PHPUnit\Extensions\Selenium2TestCase\Element; use PHPUnit\Extensions\Selenium2TestCase\Element\Select; use PHPUnit\Extensions\Selenium2TestCase\ElementCriteria; @@ -59,7 +60,7 @@ use PHPUnit\Extensions\Selenium2TestCase\WaitUntil; use PHPUnit\Extensions\Selenium2TestCase\Window; use PHPUnit\Extensions\SeleniumCommon\RemoteCoverage; -use PHPUnit\Framework\InvalidArgumentException; +use PHPUnit\Framework\InvalidArgumentException as PHPUnitInvalidArgumentException; use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestResult; use RuntimeException; @@ -198,7 +199,7 @@ abstract class Selenium2TestCase extends TestCase public static function shareSession($shareSession) { if (!is_bool($shareSession)) { - throw new \InvalidArgumentException("The shared session support can only be switched on or off."); + throw new InvalidArgumentException("The shared session support can only be switched on or off."); } if (!$shareSession) { self::$sessionStrategy = self::defaultSessionStrategy(); @@ -212,7 +213,7 @@ public static function shareSession($shareSession) public static function keepSessionOnFailure($keepSession) { if (!is_bool($keepSession)) { - throw new \InvalidArgumentException("The keep session on fail support can only be switched on or off."); + throw new InvalidArgumentException("The keep session on fail support can only be switched on or off."); } if ($keepSession){ self::$keepSessionOnFailure = TRUE; @@ -311,7 +312,7 @@ protected function setUpSessionStrategy($params) } elseif (isset($params['sessionStrategy'])) { $strat = $params['sessionStrategy']; if ($strat != "isolated" && $strat != "shared") { - throw new \InvalidArgumentException("Session strategy must be either 'isolated' or 'shared'"); + throw new InvalidArgumentException("Session strategy must be either 'isolated' or 'shared'"); } elseif ($strat == "isolated") { self::$browserSessionStrategy = new Isolated; } else { @@ -444,12 +445,12 @@ public function __call($command, $arguments) /** * @param string $host - * @throws InvalidArgumentException + * @throws PHPUnitInvalidArgumentException */ public function setHost($host) { if (!is_string($host)) { - throw InvalidArgumentException::create(1, 'string'); + throw PHPUnitInvalidArgumentException::create(1, 'string'); } $this->parameters['host'] = $host; @@ -462,12 +463,12 @@ public function getHost() /** * @param integer $port - * @throws InvalidArgumentException + * @throws PHPUnitInvalidArgumentException */ public function setPort($port) { if (!is_int($port)) { - throw InvalidArgumentException::create(1, 'integer'); + throw PHPUnitInvalidArgumentException::create(1, 'integer'); } $this->parameters['port'] = $port; @@ -480,12 +481,12 @@ public function getPort() /** * @param boolean $secure - * @throws InvalidArgumentException + * @throws PHPUnitInvalidArgumentException */ public function setSecure($secure) { if(!is_bool($secure)) { - throw InvalidArgumentException::create(1, 'boolean'); + throw PHPUnitInvalidArgumentException::create(1, 'boolean'); } $this->parameters['secure'] = $secure; @@ -498,12 +499,12 @@ public function getSecure() /** * @param string $browser - * @throws InvalidArgumentException + * @throws PHPUnitInvalidArgumentException */ public function setBrowser($browserName) { if (!is_string($browserName)) { - throw InvalidArgumentException::create(1, 'string'); + throw PHPUnitInvalidArgumentException::create(1, 'string'); } $this->parameters['browserName'] = $browserName; @@ -516,12 +517,12 @@ public function getBrowser() /** * @param string $browserUrl - * @throws InvalidArgumentException + * @throws PHPUnitInvalidArgumentException */ public function setBrowserUrl($browserUrl) { if (!is_string($browserUrl)) { - throw InvalidArgumentException::create(1, 'string'); + throw PHPUnitInvalidArgumentException::create(1, 'string'); } $this->parameters['browserUrl'] = new URL($browserUrl); From 80d8e02a6fd091a48c363d63cac334139903ba83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Thu, 19 Mar 2020 08:51:40 +0100 Subject: [PATCH 02/37] Add phpcs + config Fix automatic fixable phpcs issues update phpcs config Fix phpcs issues manually update phpcs config --- PHPUnit/Extensions/Selenium2TestCase.php | 229 +++++++++--------- .../Extensions/Selenium2TestCase/Command.php | 24 +- .../Selenium2TestCase/CommandsHolder.php | 69 +++--- .../Extensions/Selenium2TestCase/Driver.php | 85 ++++--- .../Extensions/Selenium2TestCase/Element.php | 46 ++-- .../Selenium2TestCase/Element/Accessor.php | 48 ++-- .../Selenium2TestCase/Element/Select.php | 53 ++-- .../ElementCommand/Attribute.php | 15 +- .../ElementCommand/Click.php | 11 - .../Selenium2TestCase/ElementCommand/Css.php | 15 +- .../ElementCommand/Equals.php | 18 +- .../ElementCommand/GenericAccessor.php | 13 +- .../ElementCommand/GenericPost.php | 11 - .../Selenium2TestCase/ElementCommand/Rect.php | 15 +- .../ElementCommand/Value.php | 14 +- .../Selenium2TestCase/ElementCriteria.php | 12 +- .../Selenium2TestCase/Exception.php | 11 - PHPUnit/Extensions/Selenium2TestCase/Keys.php | 121 +++++---- .../Selenium2TestCase/KeysHolder.php | 21 +- .../Selenium2TestCase/NoSeleniumException.php | 11 - .../Extensions/Selenium2TestCase/Response.php | 25 +- .../Selenium2TestCase/ScreenshotListener.php | 11 - .../Extensions/Selenium2TestCase/Session.php | 74 +++--- .../Selenium2TestCase/Session/Cookie.php | 33 ++- .../Session/Cookie/Builder.php | 43 ++-- .../Selenium2TestCase/Session/Storage.php | 19 +- .../Selenium2TestCase/Session/Timeouts.php | 27 +-- .../SessionCommand/AcceptAlert.php | 11 - .../SessionCommand/Active.php | 12 - .../SessionCommand/AlertText.php | 19 +- .../SessionCommand/Click.php | 31 +-- .../SessionCommand/DismissAlert.php | 11 - .../Selenium2TestCase/SessionCommand/File.php | 70 +++--- .../SessionCommand/Frame.php | 23 +- .../SessionCommand/GenericAccessor.php | 11 - .../SessionCommand/GenericAttribute.php | 12 +- .../Selenium2TestCase/SessionCommand/Keys.php | 23 +- .../SessionCommand/Location.php | 20 +- .../Selenium2TestCase/SessionCommand/Log.php | 15 +- .../SessionCommand/MoveTo.php | 29 +-- .../SessionCommand/Orientation.php | 20 +- .../Selenium2TestCase/SessionCommand/Url.php | 19 +- .../SessionCommand/Window.php | 13 +- .../Selenium2TestCase/SessionStrategy.php | 13 +- .../SessionStrategy/Isolated.php | 31 +-- .../SessionStrategy/Shared.php | 34 +-- .../Selenium2TestCase/StateCommand.php | 12 +- PHPUnit/Extensions/Selenium2TestCase/URL.php | 40 ++- .../Selenium2TestCase/WaitUntil.php | 61 ++--- .../Selenium2TestCase/WebDriverException.php | 63 ++--- .../Extensions/Selenium2TestCase/Window.php | 17 +- PHPUnit/Extensions/SeleniumBrowserSuite.php | 20 +- .../Extensions/SeleniumCommon/Autoload.php | 137 +++++------ .../Extensions/SeleniumCommon/ExitHandler.php | 7 +- .../SeleniumCommon/RemoteCoverage.php | 28 +-- PHPUnit/Extensions/SeleniumCommon/append.php | 13 +- .../SeleniumCommon/phpunit_coverage.php | 31 ++- PHPUnit/Extensions/SeleniumCommon/prepend.php | 17 +- PHPUnit/Extensions/SeleniumTestSuite.php | 57 ++--- composer.json | 4 +- ruleset.xml | 22 ++ 61 files changed, 771 insertions(+), 1249 deletions(-) create mode 100644 ruleset.xml diff --git a/PHPUnit/Extensions/Selenium2TestCase.php b/PHPUnit/Extensions/Selenium2TestCase.php index a99e8183..db50b65d 100644 --- a/PHPUnit/Extensions/Selenium2TestCase.php +++ b/PHPUnit/Extensions/Selenium2TestCase.php @@ -34,12 +34,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.phpunit.de/ - * @since File available since Release 1.2.0 */ namespace PHPUnit\Extensions; @@ -71,13 +66,8 @@ * (WebDriver API and JsonWire protocol) to provide * the functionality required for web testing. * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: @package_version@ * @link http://www.phpunit.de/ - * @since Class available since Release 1.2.0 + * * @method void acceptAlert() Press OK on an alert, or confirms a dialog * @method mixed alertText() alertText($value = NULL) Gets the alert dialog text, or sets the text for a prompt dialog * @method void back() @@ -122,31 +112,22 @@ */ abstract class Selenium2TestCase extends TestCase { - const VERSION = '9.0.0'; - /** - * @var string override to provide code coverage data from the server - */ + public const VERSION = '9.0.0'; + + /** @var string override to provide code coverage data from the server */ protected $coverageScriptUrl; - /** - * @var Session - */ + /** @var Session */ private $session; - /** - * @var array - */ + /** @var array */ private $parameters; - /** - * @var SessionStrategy - */ + /** @var SessionStrategy */ protected static $sessionStrategy; - /** - * @var SessionStrategy - */ + /** @var SessionStrategy */ protected static $browserSessionStrategy; /** @@ -163,123 +144,119 @@ abstract class Selenium2TestCase extends TestCase */ private static $defaultWaitUntilSleepInterval = 500; - /** - * @var SessionStrategy - */ + /** @var SessionStrategy */ protected $localSessionStrategy; - /** - * @var array - */ + /** @var array */ private static $lastBrowserParams; - /** - * @var string - */ + /** @var string */ private $testId; - /** - * @var boolean - */ + /** @var bool */ private $collectCodeCoverageInformation; - /** - * @var KeysHolder - */ + /** @var KeysHolder */ private $keysHolder; - /** - * @param boolean - */ - private static $keepSessionOnFailure = FALSE; + /** @param boolean */ + private static $keepSessionOnFailure = false; - /** - * @param boolean - */ public static function shareSession($shareSession) { - if (!is_bool($shareSession)) { - throw new InvalidArgumentException("The shared session support can only be switched on or off."); + if (! is_bool($shareSession)) { + throw new InvalidArgumentException('The shared session support can only be switched on or off.'); } - if (!$shareSession) { + + if (! $shareSession) { self::$sessionStrategy = self::defaultSessionStrategy(); } else { self::$sessionStrategy = new Shared( - self::defaultSessionStrategy(), self::$keepSessionOnFailure - ); + self::defaultSessionStrategy(), + self::$keepSessionOnFailure + ); } } public static function keepSessionOnFailure($keepSession) { - if (!is_bool($keepSession)) { - throw new InvalidArgumentException("The keep session on fail support can only be switched on or off."); + if (! is_bool($keepSession)) { + throw new InvalidArgumentException('The keep session on fail support can only be switched on or off.'); + } + + if ($keepSession) { + self::$keepSessionOnFailure = true; } - if ($keepSession){ - self::$keepSessionOnFailure = TRUE; - } } private static function sessionStrategy() { - if (!self::$sessionStrategy) { + if (! self::$sessionStrategy) { self::$sessionStrategy = self::defaultSessionStrategy(); } + return self::$sessionStrategy; } private static function defaultSessionStrategy() { - return new Isolated; + return new Isolated(); } /** * Get the default timeout for WaitUntil + * * @return int the default timeout */ - public static function defaultWaitUntilTimeout(){ + public static function defaultWaitUntilTimeout() + { return self::$defaultWaitUntilTimeout; } /** * Set the default timeout for WaitUntil + * * @param int $timeout the new default timeout */ - public static function setDefaultWaitUntilTimeout($timeout){ - $timeout = (int) $timeout; + public static function setDefaultWaitUntilTimeout($timeout) + { + $timeout = (int) $timeout; self::$defaultWaitUntilTimeout = $timeout > 0 ? $timeout : 0; } /** * Get the default sleep delay for WaitUntil + * * @return int */ - public static function defaultWaitUntilSleepInterval(){ + public static function defaultWaitUntilSleepInterval() + { return self::$defaultWaitUntilSleepInterval; } /** * Set default sleep delay for WaitUntil + * * @param int $sleepDelay the new default sleep delay */ - public static function setDefaultWaitUntilSleepInterval($sleepDelay){ - $sleepDelay = (int) $sleepDelay; + public static function setDefaultWaitUntilSleepInterval($sleepDelay) + { + $sleepDelay = (int) $sleepDelay; self::$defaultWaitUntilSleepInterval = $sleepDelay > 0 ? $sleepDelay : 0; } - - public function __construct($name = NULL, array $data = array(), $dataName = '') + public function __construct($name = null, array $data = [], $dataName = '') { parent::__construct($name, $data, $dataName); - $this->parameters = array( + $this->parameters = [ 'host' => 'localhost', 'port' => 4444, - 'browser' => NULL, - 'browserName' => NULL, - 'desiredCapabilities' => array(), + 'browser' => null, + 'browserName' => null, + 'desiredCapabilities' => [], 'seleniumServerRequestsTimeout' => 60, - 'secure' => FALSE - ); + 'secure' => false, + ]; $this->keysHolder = new KeysHolder(); } @@ -287,8 +264,9 @@ public function __construct($name = NULL, array $data = array(), $dataName = '') public function setupSpecificBrowser($params) { if (isset($params['keepSession'])) { - $this->keepSessionOnFailure(TRUE); + $this->keepSessionOnFailure(true); } + $this->setUpSessionStrategy($params); $params = array_merge($this->parameters, $params); $this->setHost($params['host']); @@ -297,7 +275,8 @@ public function setupSpecificBrowser($params) $this->parameters['browser'] = $params['browser']; $this->setDesiredCapabilities($params['desiredCapabilities']); $this->setSeleniumServerRequestsTimeout( - $params['seleniumServerRequestsTimeout']); + $params['seleniumServerRequestsTimeout'] + ); } protected function setUpSessionStrategy($params) @@ -306,24 +285,25 @@ protected function setUpSessionStrategy($params) // item in self::$browsers. We don't want them both to share one // and we don't want each test for a specific browser to have a // new strategy - if ($params == self::$lastBrowserParams) { - // do nothing so we use the same session strategy for this - // browser + + // phpcs:disable Generic.CodeAnalysis.EmptyStatement + if ($params === self::$lastBrowserParams) { + // do nothing so we use the same session strategy for this browser } elseif (isset($params['sessionStrategy'])) { $strat = $params['sessionStrategy']; - if ($strat != "isolated" && $strat != "shared") { + if ($strat !== 'isolated' && $strat !== 'shared') { throw new InvalidArgumentException("Session strategy must be either 'isolated' or 'shared'"); - } elseif ($strat == "isolated") { - self::$browserSessionStrategy = new Isolated; + } elseif ($strat === 'isolated') { + self::$browserSessionStrategy = new Isolated(); } else { self::$browserSessionStrategy = new Shared(self::defaultSessionStrategy(), self::$keepSessionOnFailure); } } else { self::$browserSessionStrategy = self::defaultSessionStrategy(); } - self::$lastBrowserParams = $params; - $this->localSessionStrategy = self::$browserSessionStrategy; + self::$lastBrowserParams = $params; + $this->localSessionStrategy = self::$browserSessionStrategy; } private function getStrategy() @@ -338,20 +318,21 @@ private function getStrategy() public function prepareSession() { try { - if (!$this->session) { + if (! $this->session) { $this->session = $this->getStrategy()->session($this->parameters); } } catch (NoSeleniumException $e) { - $this->markTestSkipped("The Selenium Server is not active on host {$this->parameters['host']} at port {$this->parameters['port']}."); + $this->markTestSkipped(sprintf('The Selenium Server is not active on host %s at port %s.', $this->parameters['host'], $this->parameters['port'])); } + return $this->session; } - public function run(TestResult $result = NULL): TestResult + public function run(?TestResult $result = null): TestResult { - $this->testId = get_class($this) . '__' . $this->getName(); + $this->testId = static::class . '__' . $this->getName(); - if ($result === NULL) { + if ($result === null) { $result = $this->createResult(); } @@ -365,7 +346,8 @@ public function run(TestResult $result = NULL): TestResult $this->testId ); $result->getCodeCoverage()->append( - $coverage->get(), $this + $coverage->get(), + $this ); } @@ -383,7 +365,7 @@ protected function runTest() { $this->prepareSession(); - $thrownException = NULL; + $thrownException = null; if ($this->collectCodeCoverageInformation) { $this->url($this->coverageScriptUrl); // phpunit_coverage.php won't do anything if the cookie isn't set, which is exactly what we want @@ -394,7 +376,7 @@ protected function runTest() $this->setUpPage(); $result = parent::runTest(); - if (!empty($this->verificationErrors)) { + if (! empty($this->verificationErrors)) { $this->fail(implode("\n", $this->verificationErrors)); } } catch (Exception $e) { @@ -405,14 +387,13 @@ protected function runTest() $this->session->cookie()->remove('PHPUNIT_SELENIUM_TEST_ID'); } - if (NULL !== $thrownException) { + if ($thrownException !== null) { throw $thrownException; } return $result; } - public static function suite($className) { return SeleniumTestSuite::fromTestCaseClass($className); @@ -429,27 +410,29 @@ public function onNotSuccessfulTest(Throwable $e): void * * @param string $command * @param array $arguments + * * @return mixed */ public function __call($command, $arguments) { - if ($this->session === NULL) { - throw new \PHPUnit\Extensions\Selenium2TestCase\Exception("There is currently no active session to execute the '$command' command. You're probably trying to set some option in setUp() with an incorrect setter name. You may consider using setUpPage() instead."); + if ($this->session === null) { + throw new \PHPUnit\Extensions\Selenium2TestCase\Exception(sprintf("There is currently no active session to execute the '%s' command. You're probably trying to set some option in setUp() with an incorrect setter name. You may consider using setUpPage() instead.", $command)); } - $result = call_user_func_array( - array($this->session, $command), $arguments - ); - return $result; + return call_user_func_array( + [$this->session, $command], + $arguments + ); } /** * @param string $host + * * @throws PHPUnitInvalidArgumentException */ public function setHost($host) { - if (!is_string($host)) { + if (! is_string($host)) { throw PHPUnitInvalidArgumentException::create(1, 'string'); } @@ -462,12 +445,13 @@ public function getHost() } /** - * @param integer $port + * @param int $port + * * @throws PHPUnitInvalidArgumentException */ public function setPort($port) { - if (!is_int($port)) { + if (! is_int($port)) { throw PHPUnitInvalidArgumentException::create(1, 'integer'); } @@ -480,12 +464,13 @@ public function getPort() } /** - * @param boolean $secure + * @param bool $secure + * * @throws PHPUnitInvalidArgumentException */ public function setSecure($secure) { - if(!is_bool($secure)) { + if (! is_bool($secure)) { throw PHPUnitInvalidArgumentException::create(1, 'boolean'); } @@ -499,11 +484,12 @@ public function getSecure() /** * @param string $browser + * * @throws PHPUnitInvalidArgumentException */ public function setBrowser($browserName) { - if (!is_string($browserName)) { + if (! is_string($browserName)) { throw PHPUnitInvalidArgumentException::create(1, 'string'); } @@ -517,11 +503,12 @@ public function getBrowser() /** * @param string $browserUrl + * * @throws PHPUnitInvalidArgumentException */ public function setBrowserUrl($browserUrl) { - if (!is_string($browserUrl)) { + if (! is_string($browserUrl)) { throw PHPUnitInvalidArgumentException::create(1, 'string'); } @@ -533,6 +520,7 @@ public function getBrowserUrl() if (isset($this->parameters['browserUrl'])) { return $this->parameters['browserUrl']; } + return ''; } @@ -544,14 +532,13 @@ public function setDesiredCapabilities(array $capabilities) $this->parameters['desiredCapabilities'] = $capabilities; } - public function getDesiredCapabilities() { return $this->parameters['desiredCapabilities']; } /** - * @param int $timeout seconds + * @param int $timeout seconds */ public function setSeleniumServerRequestsTimeout($timeout) { @@ -565,6 +552,7 @@ public function getSeleniumServerRequestsTimeout() /** * Get test id (generated internally) + * * @return string */ public function getTestId() @@ -574,6 +562,7 @@ public function getTestId() /** * Get Selenium2 current session id + * * @return string */ public function getSessionId() @@ -581,29 +570,33 @@ public function getSessionId() if ($this->session) { return $this->session->id(); } - return FALSE; + + return false; } /** * Wait until callback isn't null or timeout occurs * - * @param $callback - * @param null $timeout * @return mixed */ - public function waitUntil($callback, $timeout = NULL) + public function waitUntil($callback, $timeout = null) { $waitUntil = new WaitUntil($this); + return $waitUntil->run($callback, $timeout); } /** * Sends a special key * Deprecated due to issues with IE webdriver. Use keys() method instead + * * @deprecated + * + * @see KeysHolder + * * @param string $name + * * @throws \PHPUnit\Extensions\Selenium2TestCase\Exception - * @see KeysHolder */ public function keysSpecial($name) { @@ -620,7 +613,6 @@ public function keysSpecial($name) */ public function setUpPage() { - } /** @@ -630,9 +622,10 @@ public function alertIsPresent() { try { $this->alertText(); - return TRUE; + + return true; } catch (Exception $e) { - return NULL; + return null; } } } diff --git a/PHPUnit/Extensions/Selenium2TestCase/Command.php b/PHPUnit/Extensions/Selenium2TestCase/Command.php index 033b641e..0fc56a2c 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Command.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Command.php @@ -34,12 +34,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.phpunit.de/ - * @since File available since Release 1.2.0 */ namespace PHPUnit\Extensions\Selenium2TestCase; @@ -49,29 +44,23 @@ /** * Base class for implementing commands with special semantics. * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: @package_version@ * @link http://www.phpunit.de/ - * @since Class available since Release 1.2.0 */ abstract class Command { protected $jsonParameters; - private $commandName; /** - * @param array $jsonParameters null in case of no parameters + * @param array $jsonParameters null in case of no parameters */ public function __construct($jsonParameters, URL $url) { - if (!is_array($jsonParameters) && $jsonParameters !== NULL) { - throw new InvalidArgumentException("The JSON parameters must be an array, or a NULL value in case they are not required."); + if (! is_array($jsonParameters) && $jsonParameters !== null) { + throw new InvalidArgumentException('The JSON parameters must be an array, or a NULL value in case they are not required.'); } + $this->jsonParameters = $jsonParameters; - $this->url = $url; + $this->url = $url; } public function url() @@ -84,9 +73,6 @@ public function url() */ abstract public function httpMethod(); - /** - * @param array $jsonParameters null in case of no parameters - */ public function jsonParameters() { return $this->jsonParameters; diff --git a/PHPUnit/Extensions/Selenium2TestCase/CommandsHolder.php b/PHPUnit/Extensions/Selenium2TestCase/CommandsHolder.php index 1f7c56dd..0d151f9d 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/CommandsHolder.php +++ b/PHPUnit/Extensions/Selenium2TestCase/CommandsHolder.php @@ -34,12 +34,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.phpunit.de/ - * @since File available since Release 1.2.4 */ namespace PHPUnit\Extensions\Selenium2TestCase; @@ -51,24 +46,14 @@ /** * Object representing elements, or everything that may have subcommands. * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: @package_version@ * @link http://www.phpunit.de/ - * @since Class available since Release 1.2.4 */ abstract class CommandsHolder { - /** - * @var Driver - */ + /** @var Driver */ protected $driver; - /** - * @var string the API URL for this element, - */ + /** @var string the API URL for this element, */ protected $url; /** @@ -79,16 +64,16 @@ abstract class CommandsHolder public function __construct($driver, URL $url) { - $this->driver = $driver; - $this->url = $url; - $this->commands = array(); + $this->driver = $driver; + $this->url = $url; + $this->commands = []; foreach ($this->initCommands() as $commandName => $handler) { if (is_string($handler)) { $this->commands[$commandName] = $this->factoryMethod($handler); - } else if (is_callable($handler)) { + } elseif (is_callable($handler)) { $this->commands[$commandName] = $handler; } else { - throw new InvalidArgumentException("Command $commandName is not configured correctly."); + throw new InvalidArgumentException(sprintf('Command %s is not configured correctly.', $commandName)); } } } @@ -97,30 +82,35 @@ public function __construct($driver, URL $url) * @return array class names, or * callables of the form function($parameter, $commandUrl) */ - protected abstract function initCommands(); + abstract protected function initCommands(); public function __call($commandName, $arguments) { $jsonParameters = $this->extractJsonParameters($arguments); - $response = $this->driver->execute($this->newCommand($commandName, $jsonParameters)); + $response = $this->driver->execute($this->newCommand($commandName, $jsonParameters)); + return $response->getValue(); } protected function postCommand($name, ElementCriteria $criteria) { - $response = $this->driver->curl('POST', - $this->url->addCommand($name), - $criteria->getArrayCopy()); + $response = $this->driver->curl( + 'POST', + $this->url->addCommand($name), + $criteria->getArrayCopy() + ); + return $response->getValue(); } /** - * @params string $commandClass a class name, descending from Command * @return callable + * + * @params string $commandClass a class name, descending from Command */ private function factoryMethod($commandClass) { - return function($jsonParameters, $url) use ($commandClass) { + return static function ($jsonParameters, $url) use ($commandClass) { return new $commandClass($jsonParameters, $url); }; } @@ -129,9 +119,10 @@ private function extractJsonParameters($arguments) { $this->checkArguments($arguments); - if (count($arguments) == 0) { - return NULL; + if (count($arguments) === 0) { + return null; } + return $arguments[0]; } @@ -143,19 +134,21 @@ private function checkArguments($arguments) } /** - * @param string $commandName The called method name - * defined as a key in initCommands() - * @param array $jsonParameters + * @param string $commandName The called method name + * defined as a key in initCommands() + * @param array $jsonParameters + * * @return Command */ protected function newCommand($commandName, $jsonParameters) { if (isset($this->commands[$commandName])) { $factoryMethod = $this->commands[$commandName]; - $url = $this->url->addCommand($commandName); - $command = $factoryMethod($jsonParameters, $url); - return $command; + $url = $this->url->addCommand($commandName); + + return $factoryMethod($jsonParameters, $url); } - throw new BadMethodCallException("The command '$commandName' is not existent or not supported yet."); + + throw new BadMethodCallException(sprintf("The command '%s' is not existent or not supported yet.", $commandName)); } } diff --git a/PHPUnit/Extensions/Selenium2TestCase/Driver.php b/PHPUnit/Extensions/Selenium2TestCase/Driver.php index 1ffc4587..30ecbddb 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Driver.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Driver.php @@ -34,12 +34,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.phpunit.de/ - * @since File available since Release 1.2.0 */ namespace PHPUnit\Extensions\Selenium2TestCase; @@ -50,13 +45,7 @@ /** * Driver for creating browser session with Selenium 2 (WebDriver API). * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: @package_version@ * @link http://www.phpunit.de/ - * @since Class available since Release 1.2.0 */ class Driver { @@ -65,23 +54,22 @@ class Driver public function __construct(URL $seleniumServerUrl, $timeout = 60) { - $this->seleniumServerUrl = $seleniumServerUrl; + $this->seleniumServerUrl = $seleniumServerUrl; $this->seleniumServerRequestsTimeout = $timeout; } public function startSession(array $desiredCapabilities, URL $browserUrl) { - $sessionCreation = $this->seleniumServerUrl->descend("/wd/hub/session"); - $response = $this->curl('POST', $sessionCreation, array( - 'desiredCapabilities' => $desiredCapabilities - )); - $sessionPrefix = $response->getURL(); + $sessionCreation = $this->seleniumServerUrl->descend('/wd/hub/session'); + $response = $this->curl('POST', $sessionCreation, ['desiredCapabilities' => $desiredCapabilities,]); + $sessionPrefix = $response->getURL(); $timeouts = new Timeouts( $this, $sessionPrefix->descend('timeouts'), $this->seleniumServerRequestsTimeout * 1000 ); + return new Session( $this, $sessionPrefix, @@ -93,31 +81,34 @@ public function startSession(array $desiredCapabilities, URL $browserUrl) /** * Performs an HTTP request to the Selenium 2 server. * - * @param string $method 'GET'|'POST'|'DELETE'|... + * @param string $method 'GET'|'POST'|'DELETE'|... * @param string $url - * @param array $params JSON parameters for POST requests + * @param array $params JSON parameters for POST requests */ - public function curl($http_method, URL $url, $params = NULL) + public function curl($httpMethod, URL $url, $params = null) { $curl = curl_init($url->getValue()); curl_setopt($curl, CURLOPT_TIMEOUT, $this->seleniumServerRequestsTimeout); - curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE); - curl_setopt($curl, - CURLOPT_HTTPHEADER, - array( - 'Content-type: application/json;charset=UTF-8', - 'Accept: application/json;charset=UTF-8' - )); - - if ($http_method === 'POST') { - curl_setopt($curl, CURLOPT_POST, TRUE); + curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); + curl_setopt( + $curl, + CURLOPT_HTTPHEADER, + [ + 'Content-type: application/json;charset=UTF-8', + 'Accept: application/json;charset=UTF-8', + ] + ); + + if ($httpMethod === 'POST') { + curl_setopt($curl, CURLOPT_POST, true); if ($params && is_array($params)) { curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($params)); } else { curl_setopt($curl, CURLOPT_POSTFIELDS, ''); } - curl_setopt($curl, CURLOPT_FOLLOWLOCATION, TRUE); - } else if ($http_method == 'DELETE') { + + curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); + } elseif ($httpMethod === 'DELETE') { curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE'); } @@ -125,27 +116,31 @@ public function curl($http_method, URL $url, $params = NULL) if (curl_errno($curl)) { throw new NoSeleniumException( 'Error connection[' . curl_errno($curl) . '] to ' . - $url->getValue() . ': ' . curl_error($curl) + $url->getValue() . ': ' . curl_error($curl) ); } + $info = curl_getinfo($curl); - if ($info['http_code'] == 0) { + if ($info['http_code'] === 0) { throw new NoSeleniumException(); } - if ($info['http_code'] == 404) { - throw new BadMethodCallException("The command $url is not recognized by the server."); + + if ($info['http_code'] === 404) { + throw new BadMethodCallException(sprintf('The command %s is not recognized by the server.', $url)); } + if (($info['http_code'] >= 400) && ($info['http_code'] < 500)) { - throw new BadMethodCallException("Something unexpected happened: '$rawResponse'"); + throw new BadMethodCallException(sprintf("Something unexpected happened: '%s'", $rawResponse)); } + curl_close($curl); - $content = json_decode($rawResponse, TRUE); + $content = json_decode($rawResponse, true); if ($content === null && json_last_error() !== JSON_ERROR_NONE) { throw new \PHPUnit\Extensions\Selenium2TestCase\Exception( sprintf( - "JSON decoding of remote response failed.\n". - "Error code: %d\n". + "JSON decoding of remote response failed.\n" . + "Error code: %d\n" . "The response: '%s'\n", json_last_error(), $rawResponse @@ -163,7 +158,7 @@ public function curl($http_method, URL $url, $params = NULL) $message = $value['message']; } - $status = isset($content['status']) ? $content['status'] : 0; + $status = $content['status'] ?? 0; if ($status !== WebDriverException::Success) { throw new WebDriverException($message, $status); } @@ -173,8 +168,10 @@ public function curl($http_method, URL $url, $params = NULL) public function execute(Command $command) { - return $this->curl($command->httpMethod(), - $command->url(), - $command->jsonParameters()); + return $this->curl( + $command->httpMethod(), + $command->url(), + $command->jsonParameters() + ); } } diff --git a/PHPUnit/Extensions/Selenium2TestCase/Element.php b/PHPUnit/Extensions/Selenium2TestCase/Element.php index 5932b224..c750f0d8 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Element.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Element.php @@ -34,12 +34,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.phpunit.de/ - * @since File available since Release 1.2.0 */ namespace PHPUnit\Extensions\Selenium2TestCase; @@ -58,13 +53,8 @@ /** * Object representing a DOM element. * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: @package_version@ * @link http://www.phpunit.de/ - * @since Class available since Release 1.2.0 + * * @method string attribute($name) Retrieves an element's attribute * @method void clear() Empties the content of a form element. * @method void click() Clicks on element @@ -83,19 +73,22 @@ class Element extends Accessor { /** * @return \self + * * @throws InvalidArgumentException */ public static function fromResponseValue(array $value, URL $parentFolder, Driver $driver) { - if (!isset($value['ELEMENT'])) { + if (! isset($value['ELEMENT'])) { throw new InvalidArgumentException('Element not found.'); } + $url = $parentFolder->descend($value['ELEMENT']); + return new self($driver, $url); } /** - * @return integer + * @return int */ public function getId() { @@ -107,7 +100,7 @@ public function getId() */ protected function initCommands() { - return array( + return [ 'attribute' => Attribute::class, 'clear' => GenericPost::class, 'click' => Click::class, @@ -127,8 +120,8 @@ protected function initCommands() 'scroll' => $this->touchCommandFactoryMethod('touch/scroll'), 'doubletap' => $this->touchCommandFactoryMethod('touch/doubleclick'), 'longtap' => $this->touchCommandFactoryMethod('touch/longclick'), - 'flick' => $this->touchCommandFactoryMethod('touch/flick') - ); + 'flick' => $this->touchCommandFactoryMethod('touch/flick'), + ]; } protected function getSessionUrl() @@ -138,20 +131,23 @@ protected function getSessionUrl() private function touchCommandFactoryMethod($urlSegment) { - $url = $this->getSessionUrl()->addCommand($urlSegment); + $url = $this->getSessionUrl()->addCommand($urlSegment); $self = $this; - return function ($jsonParameters, $commandUrl) use ($url, $self) { + + return static function ($jsonParameters, $commandUrl) use ($url, $self) { if ((is_array($jsonParameters) && - !isset($jsonParameters['element'])) || - is_null($jsonParameters)) { + ! isset($jsonParameters['element'])) || + $jsonParameters === null) { $jsonParameters['element'] = $self->getId(); } + return new GenericPost($jsonParameters, $url); }; } /** * Retrieves the tag name + * * @return string */ public function name() @@ -166,22 +162,24 @@ public function name() */ public function toWebDriverObject() { - return array('ELEMENT' => (string)$this->getId()); + return ['ELEMENT' => (string) $this->getId()]; } /** * Get or set value of form elements. If the element already has a value, the set one will be appended to it. * Created **ONLY** for keeping backward compatibility, since in selenium v2.42.0 it was removed * The currently recommended solution is to use `$element->attribute('value')` + * * @see https://code.google.com/p/selenium/source/detail?r=953007b48e83f90450f3e41b11ec31e2928f1605 * @see https://code.google.com/p/selenium/source/browse/java/CHANGELOG * * @param string $newValue - * @return null|string + * + * @return string|null */ - public function value($newValue = NULL) + public function value($newValue = null) { - if ($newValue !== NULL) { + if ($newValue !== null) { return parent::value($newValue); } diff --git a/PHPUnit/Extensions/Selenium2TestCase/Element/Accessor.php b/PHPUnit/Extensions/Selenium2TestCase/Element/Accessor.php index 6e87b125..a0ae8335 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Element/Accessor.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Element/Accessor.php @@ -34,9 +34,6 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * @package PHPUnit_Selenium - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.phpunit.de/ */ @@ -47,21 +44,16 @@ use PHPUnit\Extensions\Selenium2TestCase\ElementCriteria; use PHPUnit\Extensions\Selenium2TestCase\URL; - /** * Provides access to /element and /elements commands - * - * @package PHPUnit_Selenium - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: @package_version@ + * * @link http://www.phpunit.de/ */ abstract class Accessor extends CommandsHolder { - /** - * @param string $value e.g. 'container' + * @param string $value e.g. 'container' + * * @return Element */ public function byClassName($value) @@ -70,7 +62,8 @@ public function byClassName($value) } /** - * @param string $value e.g. 'div.container' + * @param string $value e.g. 'div.container' + * * @return Element */ public function byCssSelector($value) @@ -79,7 +72,8 @@ public function byCssSelector($value) } /** - * @param string $value e.g. 'uniqueId' + * @param string $value e.g. 'uniqueId' + * * @return Element */ public function byId($value) @@ -88,7 +82,8 @@ public function byId($value) } /** - * @param string $value e.g. 'Link text' + * @param string $value e.g. 'Link text' + * * @return Element */ public function byLinkText($value) @@ -97,7 +92,8 @@ public function byLinkText($value) } /** - * @param string $value e.g. 'Link te' + * @param string $value e.g. 'Link te' + * * @return Element */ public function byPartialLinkText($value) @@ -106,7 +102,8 @@ public function byPartialLinkText($value) } /** - * @param string $value e.g. 'email_address' + * @param string $value e.g. 'email_address' + * * @return Element */ public function byName($value) @@ -115,7 +112,8 @@ public function byName($value) } /** - * @param string $value e.g. 'body' + * @param string $value e.g. 'body' + * * @return Element */ public function byTag($value) @@ -124,7 +122,8 @@ public function byTag($value) } /** - * @param string $value e.g. '/div[@attribute="value"]' + * @param string $value e.g. '/div[@attribute="value"]' + * * @return Element */ public function byXPath($value) @@ -138,6 +137,7 @@ public function byXPath($value) public function element(ElementCriteria $criteria) { $value = $this->postCommand('element', $criteria); + return Element::fromResponseValue($value, $this->getSessionUrl()->descend('element'), $this->driver); } @@ -146,16 +146,18 @@ public function element(ElementCriteria $criteria) */ public function elements(ElementCriteria $criteria) { - $values = $this->postCommand('elements', $criteria); - $elements = array(); + $values = $this->postCommand('elements', $criteria); + $elements = []; foreach ($values as $value) { $elements[] = Element::fromResponseValue($value, $this->getSessionUrl()->descend('element'), $this->driver); } + return $elements; } /** * @param string $strategy + * * @return ElementCriteria */ public function using($strategy) @@ -166,16 +168,16 @@ public function using($strategy) /** * @return URL */ - protected abstract function getSessionUrl(); + abstract protected function getSessionUrl(); /** - * @param string $strategy supported by JsonWireProtocol element/ command + * @param string $strategy supported by JsonWireProtocol element/ command * @param string $value + * * @return Element */ private function by($strategy, $value) { return $this->element($this->using($strategy)->value($value)); } - } diff --git a/PHPUnit/Extensions/Selenium2TestCase/Element/Select.php b/PHPUnit/Extensions/Selenium2TestCase/Element/Select.php index 3180a60d..71a1e2b5 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Element/Select.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Element/Select.php @@ -34,12 +34,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.phpunit.de/ - * @since File available since Release 1.2.2 */ namespace PHPUnit\Extensions\Selenium2TestCase\Element; @@ -50,13 +45,7 @@ /** * Object representing a element. - * - * @link http://www.phpunit.de/ */ class Select extends Element { diff --git a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Attribute.php b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Attribute.php index 3a3dc4ef..ea3b7f4b 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Attribute.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Attribute.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase\ElementCommand; @@ -44,8 +42,6 @@ /** * Retrieves an attribute of a DOM element. - * - * @link http://www.phpunit.de/ */ class Attribute extends Command { diff --git a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Click.php b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Click.php index 65253ef2..f6bbba64 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Click.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Click.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase\ElementCommand; @@ -43,8 +41,6 @@ /** * Clicks ok on an alert popup. - * - * @link http://www.phpunit.de/ */ class Click extends Command { diff --git a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Css.php b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Css.php index 7e95447b..7e694551 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Css.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Css.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase\ElementCommand; @@ -44,8 +42,6 @@ /** * Retrieves the value of a CSS property. - * - * @link http://www.phpunit.de/ */ class Css extends Command { diff --git a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Equals.php b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Equals.php index 8f4f2de5..3bdb95ad 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Equals.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Equals.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase\ElementCommand; @@ -46,8 +44,6 @@ /** * Checks equality (same element on the page) with another DOM element. - * - * @link http://www.phpunit.de/ */ class Equals extends Command { diff --git a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/GenericAccessor.php b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/GenericAccessor.php index 9733dcc6..04bff276 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/GenericAccessor.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/GenericAccessor.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase\ElementCommand; @@ -44,8 +42,6 @@ /** * Class for implementing commands that just return a value * (obtained with GET). - * - * @link http://www.phpunit.de/ */ class GenericAccessor extends Command { diff --git a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/GenericPost.php b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/GenericPost.php index 9da57bc8..a76113df 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/GenericPost.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/GenericPost.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase\ElementCommand; @@ -43,8 +41,6 @@ /** * Class for implementing commands that just accomplishes an action (via POST). - * - * @link http://www.phpunit.de/ */ class GenericPost extends Command { diff --git a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Rect.php b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Rect.php index 04aafb13..bd46fa5f 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Rect.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Rect.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase\ElementCommand; @@ -44,8 +42,6 @@ /** * Retrieves the element's coordinates - * - * @link http://www.phpunit.de/ */ class Rect extends Command { diff --git a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Value.php b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Value.php index e193893e..45e74853 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Value.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Value.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase\ElementCommand; @@ -44,8 +42,6 @@ /** * Get and set the element's value attribute. - * - * @link http://www.phpunit.de/ */ class Value extends Keys { diff --git a/PHPUnit/Extensions/Selenium2TestCase/ElementCriteria.php b/PHPUnit/Extensions/Selenium2TestCase/ElementCriteria.php index f3415781..e1622cf4 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ElementCriteria.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ElementCriteria.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase; @@ -44,7 +42,6 @@ /** * Conditions for selecting a DOM element. * - * @link http://www.phpunit.de/ * @see http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element */ class ElementCriteria extends ArrayObject diff --git a/PHPUnit/Extensions/Selenium2TestCase/Exception.php b/PHPUnit/Extensions/Selenium2TestCase/Exception.php index 08ce6f75..02b6dff8 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Exception.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Exception.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase; @@ -43,8 +41,6 @@ /** * Indicates an exception during the execution of Selenium 2 commands. - * - * @link http://www.phpunit.de/ */ class Exception extends RuntimeException { diff --git a/PHPUnit/Extensions/Selenium2TestCase/Keys.php b/PHPUnit/Extensions/Selenium2TestCase/Keys.php index 859ebf38..d001e826 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Keys.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Keys.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase; @@ -42,7 +40,6 @@ /** * Class to hold the special keys Unicode entities * - * @link http://www.phpunit.de/ * @see http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/value */ class Keys diff --git a/PHPUnit/Extensions/Selenium2TestCase/KeysHolder.php b/PHPUnit/Extensions/Selenium2TestCase/KeysHolder.php index d104d64a..25f2a34d 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/KeysHolder.php +++ b/PHPUnit/Extensions/Selenium2TestCase/KeysHolder.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase; @@ -42,7 +40,6 @@ /** * Class-mapper, that converts requested special key into correspondent Unicode character * - * @link http://www.phpunit.de/ * @see http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/value */ class KeysHolder diff --git a/PHPUnit/Extensions/Selenium2TestCase/NoSeleniumException.php b/PHPUnit/Extensions/Selenium2TestCase/NoSeleniumException.php index 8e38fa88..21ebc9c8 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/NoSeleniumException.php +++ b/PHPUnit/Extensions/Selenium2TestCase/NoSeleniumException.php @@ -33,15 +33,10 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase; -/** - * @link http://www.phpunit.de/ - */ class NoSeleniumException extends \PHPUnit\Extensions\Selenium2TestCase\Exception { } diff --git a/PHPUnit/Extensions/Selenium2TestCase/Response.php b/PHPUnit/Extensions/Selenium2TestCase/Response.php index a595684d..0519533c 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Response.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Response.php @@ -33,16 +33,12 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase; /** * Object representing an HTTP response from the Selenium Server. - * - * @link http://www.phpunit.de/ */ class Response { diff --git a/PHPUnit/Extensions/Selenium2TestCase/ScreenshotListener.php b/PHPUnit/Extensions/Selenium2TestCase/ScreenshotListener.php index 16226252..93de9606 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ScreenshotListener.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ScreenshotListener.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase; @@ -48,8 +46,6 @@ /** * Base class for implementing commands with special semantics. - * - * @link http://www.phpunit.de/ */ class ScreenshotListener implements TestListener { diff --git a/PHPUnit/Extensions/Selenium2TestCase/Session.php b/PHPUnit/Extensions/Selenium2TestCase/Session.php index 81bf000e..2a1acbbc 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Session.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Session.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase; @@ -66,8 +64,6 @@ /** * Browser session for Selenium 2: main point of entry for functionality. * - * @link http://www.phpunit.de/ - * * @method void acceptAlert() Press OK on an alert, or confirms a dialog * @method mixed alertText($value = NULL) Gets the alert dialog text, or sets the text for a prompt dialog * @method void back() diff --git a/PHPUnit/Extensions/Selenium2TestCase/Session/Cookie.php b/PHPUnit/Extensions/Selenium2TestCase/Session/Cookie.php index f6c032d3..39e53292 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Session/Cookie.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Session/Cookie.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase\Session; @@ -45,8 +43,6 @@ /** * Adds and remove cookies. - * - * @link http://www.phpunit.de/ */ class Cookie { diff --git a/PHPUnit/Extensions/Selenium2TestCase/Session/Cookie/Builder.php b/PHPUnit/Extensions/Selenium2TestCase/Session/Cookie/Builder.php index 2422ade4..485699a0 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Session/Cookie/Builder.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Session/Cookie/Builder.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase\Session\Cookie; @@ -42,8 +40,6 @@ // phpcs:disable SlevomatCodingStandard.Classes.UnusedPrivateElements /** * Adds a cookie. - * - * @link http://www.phpunit.de/ */ class Builder { diff --git a/PHPUnit/Extensions/Selenium2TestCase/Session/Storage.php b/PHPUnit/Extensions/Selenium2TestCase/Session/Storage.php index 6e024a8a..d7b12b3c 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Session/Storage.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Session/Storage.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase\Session; @@ -44,8 +42,6 @@ /** * Manage the local storage HTML 5 database. - * - * @link http://www.phpunit.de/ */ class Storage { diff --git a/PHPUnit/Extensions/Selenium2TestCase/Session/Timeouts.php b/PHPUnit/Extensions/Selenium2TestCase/Session/Timeouts.php index d8fa0a88..9606f672 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Session/Timeouts.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Session/Timeouts.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase\Session; @@ -46,8 +44,6 @@ /** * Manages timeouts for the current browser session. * - * @link http://www.phpunit.de/ - * * @method implicitWait(int $ms) Sets timeout when searching for elements * @method asyncScript(int $ms) Sets timeout for asynchronous scripts executed by Session::executeAsync() */ diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AcceptAlert.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AcceptAlert.php index 5ddff269..02f47eed 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AcceptAlert.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AcceptAlert.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; @@ -43,8 +41,6 @@ /** * Clicks Ok on an alert popup. - * - * @link http://www.phpunit.de/ */ class AcceptAlert extends Command { diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Active.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Active.php index e6f28149..1324e8a3 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Active.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Active.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; @@ -44,8 +42,6 @@ /** * Gets the active element from the session - * - * @link http://www.phpunit.de/ */ class Active extends Command { diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AlertText.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AlertText.php index a657aa04..f51d7547 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AlertText.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AlertText.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; @@ -45,8 +43,6 @@ /** * Obtains the text of an alert, or types into a prompt. - * - * @link http://www.phpunit.de/ */ class AlertText extends Command { diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Click.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Click.php index 62b6ddb7..997e7cd7 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Click.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Click.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; @@ -45,8 +43,6 @@ /** * Sends session click command for emulating LEFT, MIDDLE or RIGHT mouse buttons - * - * @link http://www.phpunit.de/ */ class Click extends Command { diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/DismissAlert.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/DismissAlert.php index bad90a07..326405d4 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/DismissAlert.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/DismissAlert.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; @@ -43,8 +41,6 @@ /** * Clicks Cancel on an alert popup. - * - * @link http://www.phpunit.de/ */ class DismissAlert extends Command { diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/File.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/File.php index 09c0eb0a..a2d09a9a 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/File.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/File.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; @@ -48,8 +46,6 @@ /** * Sends a file to a RC * Returns the FQ path to the transfered file - * - * @link http://www.phpunit.de/ */ class File extends Command { diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Frame.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Frame.php index 8531bbb4..310b2bd9 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Frame.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Frame.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; @@ -44,8 +42,6 @@ /** * Changes the focus to a frame. - * - * @link http://www.phpunit.de/ */ class Frame extends Command { diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/GenericAccessor.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/GenericAccessor.php index bc49be66..981592e0 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/GenericAccessor.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/GenericAccessor.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; @@ -43,8 +41,6 @@ /** * Gets an attribute from the session (title, alert text, etc.) - * - * @link http://www.phpunit.de/ */ class GenericAccessor extends Command { diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/GenericAttribute.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/GenericAttribute.php index c37d360a..065a1733 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/GenericAttribute.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/GenericAttribute.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; @@ -43,8 +41,6 @@ /** * Gets or posts an attribute from/to the session (title, alert text, etc.) - * - * @link http://www.phpunit.de/ */ class GenericAttribute extends Command { diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Keys.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Keys.php index e3892786..2667f830 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Keys.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Keys.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; @@ -45,8 +43,6 @@ /** * Gets or sets the current URL of the window. - * - * @link http://www.phpunit.de/ */ class Keys extends Command { diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Location.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Location.php index 82c8b857..10c17736 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Location.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Location.php @@ -33,16 +33,12 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; /** * Gets or posts an attribute from/to the session (title, alert text, etc.) - * - * @link http://www.phpunit.de/ */ class Location extends GenericAttribute { diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Log.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Log.php index 043d92dc..b9abac04 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Log.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Log.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; @@ -43,8 +41,6 @@ /** * Get the log for a given log type. Log buffer is reset after each request. - * - * @link http://www.phpunit.de/ */ class Log extends Command { diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/MoveTo.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/MoveTo.php index f0ed3723..66cbb45c 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/MoveTo.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/MoveTo.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; @@ -45,8 +43,6 @@ /** * Moves the mouse pointer. - * - * @link http://www.phpunit.de/ */ class MoveTo extends Command { diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Orientation.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Orientation.php index ddf15a94..e783809d 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Orientation.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Orientation.php @@ -33,16 +33,12 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; /** * Gets or posts an attribute from/to the session (title, alert text, etc.) - * - * @link http://www.phpunit.de/ */ class Orientation extends GenericAttribute { diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Url.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Url.php index 18ac3566..bbb3200a 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Url.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Url.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; @@ -44,8 +42,6 @@ /** * Gets or sets the current URL of the window. - * - * @link http://www.phpunit.de/ */ class Url extends Command { diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Window.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Window.php index 87599076..e9361e34 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Window.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Window.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; @@ -43,8 +41,6 @@ /** * Changes the focus to a window. - * - * @link http://www.phpunit.de/ */ class Window extends Command { diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy.php b/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy.php index 1f206478..973de0b1 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy.php @@ -33,16 +33,12 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase; /** * Specifies how to create Session objects for running tests. - * - * @link http://www.phpunit.de/ */ interface SessionStrategy { diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy/Isolated.php b/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy/Isolated.php index 28ae1183..aa069a4d 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy/Isolated.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy/Isolated.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionStrategy; @@ -46,8 +44,6 @@ /** * Produces a new Session object shared for each test. - * - * @link http://www.phpunit.de/ */ class Isolated implements SessionStrategy { diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy/Shared.php b/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy/Shared.php index 1d7eb884..d7c9fb80 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy/Shared.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy/Shared.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionStrategy; @@ -44,8 +42,6 @@ /** * Keeps a Session object shared between test runs to save time. - * - * @link http://www.phpunit.de/ */ class Shared implements SessionStrategy { diff --git a/PHPUnit/Extensions/Selenium2TestCase/StateCommand.php b/PHPUnit/Extensions/Selenium2TestCase/StateCommand.php index 951fa2f7..7a06fa07 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/StateCommand.php +++ b/PHPUnit/Extensions/Selenium2TestCase/StateCommand.php @@ -33,16 +33,12 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase; /** * Gets or sets an attribute of an object. - * - * @link http://www.phpunit.de/ */ class StateCommand extends Command { diff --git a/PHPUnit/Extensions/Selenium2TestCase/URL.php b/PHPUnit/Extensions/Selenium2TestCase/URL.php index 125d8d6d..31782606 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/URL.php +++ b/PHPUnit/Extensions/Selenium2TestCase/URL.php @@ -33,16 +33,12 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase; /** * URL Value Object allowing easy concatenation. - * - * @link http://www.phpunit.de/ */ final class URL { diff --git a/PHPUnit/Extensions/Selenium2TestCase/WaitUntil.php b/PHPUnit/Extensions/Selenium2TestCase/WaitUntil.php index 54035e22..994a201c 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/WaitUntil.php +++ b/PHPUnit/Extensions/Selenium2TestCase/WaitUntil.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase; @@ -44,7 +42,6 @@ /** * The WaitUntil implementation, inspired by Java and .NET clients * - * @link http://www.phpunit.de/ * @see http://selenium.googlecode.com/svn/trunk/dotnet/src/WebDriver.Support/UI/WebDriverWait.cs * @see http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium/support/ui/FluentWait.java */ diff --git a/PHPUnit/Extensions/Selenium2TestCase/WebDriverException.php b/PHPUnit/Extensions/Selenium2TestCase/WebDriverException.php index 64d6e10d..66a951a4 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/WebDriverException.php +++ b/PHPUnit/Extensions/Selenium2TestCase/WebDriverException.php @@ -33,16 +33,12 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase; /** * Indicates an exception as a result of a non-sucessful WebDriver response status code. - * - * @link http://www.phpunit.de/ */ class WebDriverException extends \PHPUnit\Extensions\Selenium2TestCase\Exception { diff --git a/PHPUnit/Extensions/Selenium2TestCase/Window.php b/PHPUnit/Extensions/Selenium2TestCase/Window.php index 70d5b3f0..01e17760 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Window.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Window.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions\Selenium2TestCase; @@ -44,8 +42,6 @@ /** * Object representing a browser window. * - * @link http://www.phpunit.de/ - * * @method array size(array $size = null) Window size as array('width' => $x, 'height' => $y) * @method array position(array $position = null) Window position as array('x' => $x, 'y' => $y) * @method array maximize() Maximize window diff --git a/PHPUnit/Extensions/SeleniumBrowserSuite.php b/PHPUnit/Extensions/SeleniumBrowserSuite.php index 94d6c8c8..c5d929c7 100644 --- a/PHPUnit/Extensions/SeleniumBrowserSuite.php +++ b/PHPUnit/Extensions/SeleniumBrowserSuite.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions; @@ -46,8 +44,6 @@ /** * TestSuite class for a set of tests from a single Testcase Class * executed with a particular browser. - * - * @link http://www.phpunit.de/ */ class SeleniumBrowserSuite extends TestSuite { diff --git a/PHPUnit/Extensions/SeleniumCommon/Autoload.php b/PHPUnit/Extensions/SeleniumCommon/Autoload.php index f6577c4d..1d66d42b 100644 --- a/PHPUnit/Extensions/SeleniumCommon/Autoload.php +++ b/PHPUnit/Extensions/SeleniumCommon/Autoload.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ require_once 'File/Iterator/Autoload.php'; diff --git a/PHPUnit/Extensions/SeleniumCommon/append.php b/PHPUnit/Extensions/SeleniumCommon/append.php index ed2bb04e..93a1f2d0 100644 --- a/PHPUnit/Extensions/SeleniumCommon/append.php +++ b/PHPUnit/Extensions/SeleniumCommon/append.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ if (isset($_COOKIE['PHPUNIT_SELENIUM_TEST_ID']) && diff --git a/PHPUnit/Extensions/SeleniumCommon/phpunit_coverage.php b/PHPUnit/Extensions/SeleniumCommon/phpunit_coverage.php index d75292fa..eab50efd 100644 --- a/PHPUnit/Extensions/SeleniumCommon/phpunit_coverage.php +++ b/PHPUnit/Extensions/SeleniumCommon/phpunit_coverage.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ $directory = realpath(__DIR__); diff --git a/PHPUnit/Extensions/SeleniumCommon/prepend.php b/PHPUnit/Extensions/SeleniumCommon/prepend.php index f8bff667..42f8322e 100644 --- a/PHPUnit/Extensions/SeleniumCommon/prepend.php +++ b/PHPUnit/Extensions/SeleniumCommon/prepend.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ use PHPUnit\Extensions\SeleniumCommon\ExitHandler; diff --git a/PHPUnit/Extensions/SeleniumTestSuite.php b/PHPUnit/Extensions/SeleniumTestSuite.php index 107ce19a..f47275de 100644 --- a/PHPUnit/Extensions/SeleniumTestSuite.php +++ b/PHPUnit/Extensions/SeleniumTestSuite.php @@ -33,8 +33,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * @link http://www.phpunit.de/ */ namespace PHPUnit\Extensions; @@ -47,8 +45,6 @@ /** * TestSuite class for Selenium 1 tests - * - * @link http://www.phpunit.de/ */ class SeleniumTestSuite extends TestSuite { diff --git a/ruleset.xml b/ruleset.xml index 6be0e090..1c49c850 100644 --- a/ruleset.xml +++ b/ruleset.xml @@ -19,4 +19,12 @@ + + + + + + + + \ No newline at end of file From c63b64a10afadd60038112e2f46bd164b9a8b64b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Fri, 20 Mar 2020 20:54:11 +0100 Subject: [PATCH 05/37] Simplify copyright header to be equals as PHPUnit --- PHPUnit/Extensions/Selenium2TestCase.php | 38 +++------------- .../Extensions/Selenium2TestCase/Command.php | 37 +++------------- .../Selenium2TestCase/CommandsHolder.php | 37 +++------------- .../Extensions/Selenium2TestCase/Driver.php | 37 +++------------- .../Extensions/Selenium2TestCase/Element.php | 37 +++------------- .../Selenium2TestCase/Element/Accessor.php | 37 +++------------- .../Selenium2TestCase/Element/Select.php | 37 +++------------- .../ElementCommand/Attribute.php | 37 +++------------- .../ElementCommand/Click.php | 37 +++------------- .../Selenium2TestCase/ElementCommand/Css.php | 37 +++------------- .../ElementCommand/Equals.php | 37 +++------------- .../ElementCommand/GenericAccessor.php | 37 +++------------- .../ElementCommand/GenericPost.php | 37 +++------------- .../Selenium2TestCase/ElementCommand/Rect.php | 37 +++------------- .../ElementCommand/Value.php | 37 +++------------- .../Selenium2TestCase/ElementCriteria.php | 37 +++------------- .../Selenium2TestCase/Exception.php | 37 +++------------- PHPUnit/Extensions/Selenium2TestCase/Keys.php | 37 +++------------- .../Selenium2TestCase/KeysHolder.php | 37 +++------------- .../Selenium2TestCase/NoSeleniumException.php | 37 +++------------- .../Extensions/Selenium2TestCase/Response.php | 37 +++------------- .../Selenium2TestCase/ScreenshotListener.php | 37 +++------------- .../Extensions/Selenium2TestCase/Session.php | 37 +++------------- .../Selenium2TestCase/Session/Cookie.php | 37 +++------------- .../Session/Cookie/Builder.php | 37 +++------------- .../Selenium2TestCase/Session/Storage.php | 37 +++------------- .../Selenium2TestCase/Session/Timeouts.php | 37 +++------------- .../SessionCommand/AcceptAlert.php | 37 +++------------- .../SessionCommand/Active.php | 37 +++------------- .../SessionCommand/AlertText.php | 37 +++------------- .../SessionCommand/Click.php | 37 +++------------- .../SessionCommand/DismissAlert.php | 37 +++------------- .../Selenium2TestCase/SessionCommand/File.php | 37 +++------------- .../SessionCommand/Frame.php | 37 +++------------- .../SessionCommand/GenericAccessor.php | 37 +++------------- .../SessionCommand/GenericAttribute.php | 37 +++------------- .../Selenium2TestCase/SessionCommand/Keys.php | 37 +++------------- .../SessionCommand/Location.php | 37 +++------------- .../Selenium2TestCase/SessionCommand/Log.php | 37 +++------------- .../SessionCommand/MoveTo.php | 37 +++------------- .../SessionCommand/Orientation.php | 37 +++------------- .../Selenium2TestCase/SessionCommand/Url.php | 37 +++------------- .../SessionCommand/Window.php | 37 +++------------- .../Selenium2TestCase/SessionStrategy.php | 37 +++------------- .../SessionStrategy/Isolated.php | 37 +++------------- .../SessionStrategy/Shared.php | 37 +++------------- .../Selenium2TestCase/StateCommand.php | 37 +++------------- PHPUnit/Extensions/Selenium2TestCase/URL.php | 37 +++------------- .../Selenium2TestCase/WaitUntil.php | 37 +++------------- .../Selenium2TestCase/WebDriverException.php | 37 +++------------- .../Extensions/Selenium2TestCase/Window.php | 37 +++------------- PHPUnit/Extensions/SeleniumBrowserSuite.php | 37 +++------------- .../Extensions/SeleniumCommon/Autoload.php | 37 +++------------- .../Extensions/SeleniumCommon/Autoload.php.in | 44 +++---------------- PHPUnit/Extensions/SeleniumCommon/append.php | 37 +++------------- .../SeleniumCommon/phpunit_coverage.php | 37 +++------------- PHPUnit/Extensions/SeleniumCommon/prepend.php | 37 +++------------- PHPUnit/Extensions/SeleniumTestSuite.php | 37 +++------------- 58 files changed, 290 insertions(+), 1864 deletions(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase.php b/PHPUnit/Extensions/Selenium2TestCase.php index 2d87c3e5..348f4f1e 100644 --- a/PHPUnit/Extensions/Selenium2TestCase.php +++ b/PHPUnit/Extensions/Selenium2TestCase.php @@ -1,39 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. +/* + * This file is part of PHPUnit. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * (c) Sebastian Bergmann * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions; diff --git a/PHPUnit/Extensions/Selenium2TestCase/Command.php b/PHPUnit/Extensions/Selenium2TestCase/Command.php index 7df9ae9d..879ad179 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Command.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Command.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase; diff --git a/PHPUnit/Extensions/Selenium2TestCase/CommandsHolder.php b/PHPUnit/Extensions/Selenium2TestCase/CommandsHolder.php index f9965623..c1edf01c 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/CommandsHolder.php +++ b/PHPUnit/Extensions/Selenium2TestCase/CommandsHolder.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase; diff --git a/PHPUnit/Extensions/Selenium2TestCase/Driver.php b/PHPUnit/Extensions/Selenium2TestCase/Driver.php index ec3e42a9..79b9815d 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Driver.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Driver.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase; diff --git a/PHPUnit/Extensions/Selenium2TestCase/Element.php b/PHPUnit/Extensions/Selenium2TestCase/Element.php index e72ad785..faeeeb31 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Element.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Element.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase; diff --git a/PHPUnit/Extensions/Selenium2TestCase/Element/Accessor.php b/PHPUnit/Extensions/Selenium2TestCase/Element/Accessor.php index 4093f65b..927d9cae 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Element/Accessor.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Element/Accessor.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\Element; diff --git a/PHPUnit/Extensions/Selenium2TestCase/Element/Select.php b/PHPUnit/Extensions/Selenium2TestCase/Element/Select.php index ec3175d6..772e55a7 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Element/Select.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Element/Select.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\Element; diff --git a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Attribute.php b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Attribute.php index ea3b7f4b..16997e76 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Attribute.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Attribute.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\ElementCommand; diff --git a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Click.php b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Click.php index f6bbba64..b6137e61 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Click.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Click.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\ElementCommand; diff --git a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Css.php b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Css.php index 7e694551..a33756c0 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Css.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Css.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\ElementCommand; diff --git a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Equals.php b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Equals.php index 3bdb95ad..da44de29 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Equals.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Equals.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\ElementCommand; diff --git a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/GenericAccessor.php b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/GenericAccessor.php index 04bff276..73ccb35d 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/GenericAccessor.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/GenericAccessor.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\ElementCommand; diff --git a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/GenericPost.php b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/GenericPost.php index a76113df..fa53603b 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/GenericPost.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/GenericPost.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\ElementCommand; diff --git a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Rect.php b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Rect.php index bd46fa5f..dec96b3a 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Rect.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Rect.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\ElementCommand; diff --git a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Value.php b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Value.php index 45e74853..ee9dbe6a 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Value.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Value.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\ElementCommand; diff --git a/PHPUnit/Extensions/Selenium2TestCase/ElementCriteria.php b/PHPUnit/Extensions/Selenium2TestCase/ElementCriteria.php index e1622cf4..33b8c6d8 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ElementCriteria.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ElementCriteria.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase; diff --git a/PHPUnit/Extensions/Selenium2TestCase/Exception.php b/PHPUnit/Extensions/Selenium2TestCase/Exception.php index 02b6dff8..6ca83d42 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Exception.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Exception.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase; diff --git a/PHPUnit/Extensions/Selenium2TestCase/Keys.php b/PHPUnit/Extensions/Selenium2TestCase/Keys.php index d001e826..3af4baba 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Keys.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Keys.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase; diff --git a/PHPUnit/Extensions/Selenium2TestCase/KeysHolder.php b/PHPUnit/Extensions/Selenium2TestCase/KeysHolder.php index 25f2a34d..bc9d48ce 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/KeysHolder.php +++ b/PHPUnit/Extensions/Selenium2TestCase/KeysHolder.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase; diff --git a/PHPUnit/Extensions/Selenium2TestCase/NoSeleniumException.php b/PHPUnit/Extensions/Selenium2TestCase/NoSeleniumException.php index 21ebc9c8..96b143e3 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/NoSeleniumException.php +++ b/PHPUnit/Extensions/Selenium2TestCase/NoSeleniumException.php @@ -1,38 +1,11 @@ . - * All rights reserved. + * (c) Sebastian Bergmann * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase; diff --git a/PHPUnit/Extensions/Selenium2TestCase/Response.php b/PHPUnit/Extensions/Selenium2TestCase/Response.php index 0519533c..648cb6be 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Response.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Response.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase; diff --git a/PHPUnit/Extensions/Selenium2TestCase/ScreenshotListener.php b/PHPUnit/Extensions/Selenium2TestCase/ScreenshotListener.php index 93de9606..3be45857 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ScreenshotListener.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ScreenshotListener.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase; diff --git a/PHPUnit/Extensions/Selenium2TestCase/Session.php b/PHPUnit/Extensions/Selenium2TestCase/Session.php index 2a1acbbc..a5381c67 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Session.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Session.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase; diff --git a/PHPUnit/Extensions/Selenium2TestCase/Session/Cookie.php b/PHPUnit/Extensions/Selenium2TestCase/Session/Cookie.php index 39e53292..4f6100df 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Session/Cookie.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Session/Cookie.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\Session; diff --git a/PHPUnit/Extensions/Selenium2TestCase/Session/Cookie/Builder.php b/PHPUnit/Extensions/Selenium2TestCase/Session/Cookie/Builder.php index 485699a0..1d31f6d3 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Session/Cookie/Builder.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Session/Cookie/Builder.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\Session\Cookie; diff --git a/PHPUnit/Extensions/Selenium2TestCase/Session/Storage.php b/PHPUnit/Extensions/Selenium2TestCase/Session/Storage.php index d7b12b3c..563dfa56 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Session/Storage.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Session/Storage.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\Session; diff --git a/PHPUnit/Extensions/Selenium2TestCase/Session/Timeouts.php b/PHPUnit/Extensions/Selenium2TestCase/Session/Timeouts.php index 9606f672..0dd00d25 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Session/Timeouts.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Session/Timeouts.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\Session; diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AcceptAlert.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AcceptAlert.php index 02f47eed..b07152b7 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AcceptAlert.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AcceptAlert.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Active.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Active.php index 1324e8a3..df108ec7 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Active.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Active.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AlertText.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AlertText.php index f51d7547..4e41b1a7 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AlertText.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AlertText.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Click.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Click.php index 997e7cd7..e0fb301c 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Click.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Click.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/DismissAlert.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/DismissAlert.php index 326405d4..89ad41f2 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/DismissAlert.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/DismissAlert.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/File.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/File.php index a2d09a9a..d6f3f27e 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/File.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/File.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Frame.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Frame.php index 310b2bd9..4f986fed 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Frame.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Frame.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/GenericAccessor.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/GenericAccessor.php index 981592e0..d1c5ea59 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/GenericAccessor.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/GenericAccessor.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/GenericAttribute.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/GenericAttribute.php index 065a1733..ae97c2a3 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/GenericAttribute.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/GenericAttribute.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Keys.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Keys.php index 2667f830..d6b0ec39 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Keys.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Keys.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Location.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Location.php index 10c17736..af481245 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Location.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Location.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Log.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Log.php index b9abac04..2428106d 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Log.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Log.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/MoveTo.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/MoveTo.php index 66cbb45c..6d0a0d0e 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/MoveTo.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/MoveTo.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Orientation.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Orientation.php index e783809d..0a211463 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Orientation.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Orientation.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Url.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Url.php index bbb3200a..560faebd 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Url.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Url.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Window.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Window.php index e9361e34..5a737457 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Window.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Window.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy.php b/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy.php index 973de0b1..d6ba909f 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase; diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy/Isolated.php b/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy/Isolated.php index aa069a4d..6493621a 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy/Isolated.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy/Isolated.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionStrategy; diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy/Shared.php b/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy/Shared.php index d7c9fb80..86eec97d 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy/Shared.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy/Shared.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase\SessionStrategy; diff --git a/PHPUnit/Extensions/Selenium2TestCase/StateCommand.php b/PHPUnit/Extensions/Selenium2TestCase/StateCommand.php index 7a06fa07..c487c8bb 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/StateCommand.php +++ b/PHPUnit/Extensions/Selenium2TestCase/StateCommand.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase; diff --git a/PHPUnit/Extensions/Selenium2TestCase/URL.php b/PHPUnit/Extensions/Selenium2TestCase/URL.php index 31782606..7021e3e2 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/URL.php +++ b/PHPUnit/Extensions/Selenium2TestCase/URL.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase; diff --git a/PHPUnit/Extensions/Selenium2TestCase/WaitUntil.php b/PHPUnit/Extensions/Selenium2TestCase/WaitUntil.php index 994a201c..605f2bce 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/WaitUntil.php +++ b/PHPUnit/Extensions/Selenium2TestCase/WaitUntil.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase; diff --git a/PHPUnit/Extensions/Selenium2TestCase/WebDriverException.php b/PHPUnit/Extensions/Selenium2TestCase/WebDriverException.php index 66a951a4..e9440cd5 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/WebDriverException.php +++ b/PHPUnit/Extensions/Selenium2TestCase/WebDriverException.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase; diff --git a/PHPUnit/Extensions/Selenium2TestCase/Window.php b/PHPUnit/Extensions/Selenium2TestCase/Window.php index 01e17760..d2d0d37d 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Window.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Window.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions\Selenium2TestCase; diff --git a/PHPUnit/Extensions/SeleniumBrowserSuite.php b/PHPUnit/Extensions/SeleniumBrowserSuite.php index c5d929c7..a1da8392 100644 --- a/PHPUnit/Extensions/SeleniumBrowserSuite.php +++ b/PHPUnit/Extensions/SeleniumBrowserSuite.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions; diff --git a/PHPUnit/Extensions/SeleniumCommon/Autoload.php b/PHPUnit/Extensions/SeleniumCommon/Autoload.php index 1d66d42b..78034060 100644 --- a/PHPUnit/Extensions/SeleniumCommon/Autoload.php +++ b/PHPUnit/Extensions/SeleniumCommon/Autoload.php @@ -1,38 +1,11 @@ . - * All rights reserved. + * (c) Sebastian Bergmann * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ require_once 'File/Iterator/Autoload.php'; diff --git a/PHPUnit/Extensions/SeleniumCommon/Autoload.php.in b/PHPUnit/Extensions/SeleniumCommon/Autoload.php.in index 9e97b3f1..5219a12a 100644 --- a/PHPUnit/Extensions/SeleniumCommon/Autoload.php.in +++ b/PHPUnit/Extensions/SeleniumCommon/Autoload.php.in @@ -1,45 +1,11 @@ . - * All rights reserved. + * (c) Sebastian Bergmann * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_Selenium - * @author Sebastian Bergmann - * @copyright 2002-2010 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.phpunit.de/ - * @since File available since Release 1.1.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ require_once 'File/Iterator/Autoload.php'; diff --git a/PHPUnit/Extensions/SeleniumCommon/append.php b/PHPUnit/Extensions/SeleniumCommon/append.php index 93a1f2d0..47e31da3 100644 --- a/PHPUnit/Extensions/SeleniumCommon/append.php +++ b/PHPUnit/Extensions/SeleniumCommon/append.php @@ -1,38 +1,11 @@ . - * All rights reserved. + * (c) Sebastian Bergmann * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ if (isset($_COOKIE['PHPUNIT_SELENIUM_TEST_ID']) && diff --git a/PHPUnit/Extensions/SeleniumCommon/phpunit_coverage.php b/PHPUnit/Extensions/SeleniumCommon/phpunit_coverage.php index eab50efd..316a9098 100644 --- a/PHPUnit/Extensions/SeleniumCommon/phpunit_coverage.php +++ b/PHPUnit/Extensions/SeleniumCommon/phpunit_coverage.php @@ -1,38 +1,11 @@ . - * All rights reserved. + * (c) Sebastian Bergmann * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ $directory = realpath(__DIR__); diff --git a/PHPUnit/Extensions/SeleniumCommon/prepend.php b/PHPUnit/Extensions/SeleniumCommon/prepend.php index 42f8322e..29d44b4d 100644 --- a/PHPUnit/Extensions/SeleniumCommon/prepend.php +++ b/PHPUnit/Extensions/SeleniumCommon/prepend.php @@ -1,38 +1,11 @@ . - * All rights reserved. + * (c) Sebastian Bergmann * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ use PHPUnit\Extensions\SeleniumCommon\ExitHandler; diff --git a/PHPUnit/Extensions/SeleniumTestSuite.php b/PHPUnit/Extensions/SeleniumTestSuite.php index f47275de..15288ec7 100644 --- a/PHPUnit/Extensions/SeleniumTestSuite.php +++ b/PHPUnit/Extensions/SeleniumTestSuite.php @@ -1,38 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of PHPUnit. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace PHPUnit\Extensions; From 843733ace70d30421bc7aa0a6137e83b682bb432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Fri, 20 Mar 2020 21:16:55 +0100 Subject: [PATCH 06/37] Add type hints in SeleniumBrowserSuite --- PHPUnit/Extensions/SeleniumBrowserSuite.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PHPUnit/Extensions/SeleniumBrowserSuite.php b/PHPUnit/Extensions/SeleniumBrowserSuite.php index a1da8392..82eb6d30 100644 --- a/PHPUnit/Extensions/SeleniumBrowserSuite.php +++ b/PHPUnit/Extensions/SeleniumBrowserSuite.php @@ -32,7 +32,7 @@ public function addTestMethod(ReflectionClass $class, ReflectionMethod $method): parent::addTestMethod($class, $method); } - public static function fromClassAndBrowser($className, array $browser) + public static function fromClassAndBrowser(string $className, array $browser): self { $browserSuite = new self(); if (isset($browser['browserName'])) { @@ -48,12 +48,12 @@ public static function fromClassAndBrowser($className, array $browser) return $browserSuite; } - public function setupSpecificBrowser(array $browser) + public function setupSpecificBrowser(array $browser): void { $this->browserOnAllTests($this, $browser); } - private function browserOnAllTests(TestSuite $suite, array $browser) + private function browserOnAllTests(TestSuite $suite, array $browser): void { foreach ($suite->tests() as $test) { if ($test instanceof TestSuite) { From 99496be011d26cc105e9d926816d50678d5981ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Fri, 20 Mar 2020 21:21:40 +0100 Subject: [PATCH 07/37] Add type hints in Selenium2TestCase + fix test --- PHPUnit/Extensions/Selenium2TestCase.php | 144 +++++------------- .../MultipleBrowsersPropertyTest.php | 2 +- 2 files changed, 37 insertions(+), 109 deletions(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase.php b/PHPUnit/Extensions/Selenium2TestCase.php index 348f4f1e..cf119969 100644 --- a/PHPUnit/Extensions/Selenium2TestCase.php +++ b/PHPUnit/Extensions/Selenium2TestCase.php @@ -26,7 +26,6 @@ use PHPUnit\Extensions\Selenium2TestCase\WaitUntil; use PHPUnit\Extensions\Selenium2TestCase\Window; use PHPUnit\Extensions\SeleniumCommon\RemoteCoverage; -use PHPUnit\Framework\InvalidArgumentException as PHPUnitInvalidArgumentException; use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestResult; use RuntimeException; @@ -131,12 +130,8 @@ abstract class Selenium2TestCase extends TestCase /** @param boolean */ private static $keepSessionOnFailure = false; - public static function shareSession($shareSession) + public static function shareSession(bool $shareSession): void { - if (! is_bool($shareSession)) { - throw new InvalidArgumentException('The shared session support can only be switched on or off.'); - } - if (! $shareSession) { self::$sessionStrategy = self::defaultSessionStrategy(); } else { @@ -147,18 +142,14 @@ public static function shareSession($shareSession) } } - public static function keepSessionOnFailure($keepSession) + public static function keepSessionOnFailure(bool $keepSession): void { - if (! is_bool($keepSession)) { - throw new InvalidArgumentException('The keep session on fail support can only be switched on or off.'); - } - if ($keepSession) { self::$keepSessionOnFailure = true; } } - private static function sessionStrategy() + private static function sessionStrategy(): SessionStrategy { if (! self::$sessionStrategy) { self::$sessionStrategy = self::defaultSessionStrategy(); @@ -167,50 +158,40 @@ private static function sessionStrategy() return self::$sessionStrategy; } - private static function defaultSessionStrategy() + private static function defaultSessionStrategy(): SessionStrategy { return new Isolated(); } /** * Get the default timeout for WaitUntil - * - * @return int the default timeout */ - public static function defaultWaitUntilTimeout() + public static function defaultWaitUntilTimeout(): int { return self::$defaultWaitUntilTimeout; } /** * Set the default timeout for WaitUntil - * - * @param int $timeout the new default timeout */ - public static function setDefaultWaitUntilTimeout($timeout) + public static function setDefaultWaitUntilTimeout(int $timeout): void { - $timeout = (int) $timeout; self::$defaultWaitUntilTimeout = $timeout > 0 ? $timeout : 0; } /** * Get the default sleep delay for WaitUntil - * - * @return int */ - public static function defaultWaitUntilSleepInterval() + public static function defaultWaitUntilSleepInterval(): int { return self::$defaultWaitUntilSleepInterval; } /** * Set default sleep delay for WaitUntil - * - * @param int $sleepDelay the new default sleep delay */ - public static function setDefaultWaitUntilSleepInterval($sleepDelay) + public static function setDefaultWaitUntilSleepInterval(int $sleepDelay): void { - $sleepDelay = (int) $sleepDelay; self::$defaultWaitUntilSleepInterval = $sleepDelay > 0 ? $sleepDelay : 0; } @@ -230,7 +211,7 @@ public function __construct($name = null, array $data = [], $dataName = '') $this->keysHolder = new KeysHolder(); } - public function setupSpecificBrowser($params) + public function setupSpecificBrowser(array $params): void { if (isset($params['keepSession'])) { $this->keepSessionOnFailure(true); @@ -248,7 +229,7 @@ public function setupSpecificBrowser($params) ); } - protected function setUpSessionStrategy($params) + protected function setUpSessionStrategy(array $params): void { // This logic enables us to have a session strategy reused for each // item in self::$browsers. We don't want them both to share one @@ -275,7 +256,7 @@ protected function setUpSessionStrategy($params) $this->localSessionStrategy = self::$browserSessionStrategy; } - private function getStrategy() + private function getStrategy(): SessionStrategy { if ($this->localSessionStrategy) { return $this->localSessionStrategy; @@ -284,7 +265,7 @@ private function getStrategy() } } - public function prepareSession() + public function prepareSession(): Session { try { if (! $this->session) { @@ -363,7 +344,10 @@ protected function runTest() return $result; } - public static function suite($className) + /** + * @return SeleniumTestSuite + */ + public static function suite(string $className) { return SeleniumTestSuite::fromTestCaseClass($className); } @@ -394,147 +378,91 @@ public function __call($command, $arguments) ); } - /** - * @param string $host - * - * @throws PHPUnitInvalidArgumentException - */ - public function setHost($host) + public function setHost(string $host): void { - if (! is_string($host)) { - throw PHPUnitInvalidArgumentException::create(1, 'string'); - } - $this->parameters['host'] = $host; } - public function getHost() + public function getHost(): string { return $this->parameters['host']; } - /** - * @param int $port - * - * @throws PHPUnitInvalidArgumentException - */ - public function setPort($port) + public function setPort(int $port): void { - if (! is_int($port)) { - throw PHPUnitInvalidArgumentException::create(1, 'integer'); - } - $this->parameters['port'] = $port; } - public function getPort() + public function getPort(): int { return $this->parameters['port']; } - /** - * @param bool $secure - * - * @throws PHPUnitInvalidArgumentException - */ - public function setSecure($secure) + public function setSecure(bool $secure): void { - if (! is_bool($secure)) { - throw PHPUnitInvalidArgumentException::create(1, 'boolean'); - } - $this->parameters['secure'] = $secure; } - public function getSecure() + public function getSecure(): bool { return $this->parameters['secure']; } - /** - * @param string $browser - * - * @throws PHPUnitInvalidArgumentException - */ - public function setBrowser($browserName) + public function setBrowser(string $browserName): void { - if (! is_string($browserName)) { - throw PHPUnitInvalidArgumentException::create(1, 'string'); - } - $this->parameters['browserName'] = $browserName; } - public function getBrowser() + public function getBrowser(): string { return $this->parameters['browserName']; } - /** - * @param string $browserUrl - * - * @throws PHPUnitInvalidArgumentException - */ - public function setBrowserUrl($browserUrl) + public function setBrowserUrl(string $browserUrl): void { - if (! is_string($browserUrl)) { - throw PHPUnitInvalidArgumentException::create(1, 'string'); - } - $this->parameters['browserUrl'] = new URL($browserUrl); } - public function getBrowserUrl() + public function getBrowserUrl(): string { - if (isset($this->parameters['browserUrl'])) { - return $this->parameters['browserUrl']; - } - - return ''; + return $this->parameters['browserUrl'] ?? ''; } /** * @see http://code.google.com/p/selenium/wiki/JsonWireProtocol */ - public function setDesiredCapabilities(array $capabilities) + public function setDesiredCapabilities(array $capabilities): void { $this->parameters['desiredCapabilities'] = $capabilities; } - public function getDesiredCapabilities() + public function getDesiredCapabilities(): array { return $this->parameters['desiredCapabilities']; } - /** - * @param int $timeout seconds - */ - public function setSeleniumServerRequestsTimeout($timeout) + public function setSeleniumServerRequestsTimeout(int $timeout): void { $this->parameters['seleniumServerRequestsTimeout'] = $timeout; } - public function getSeleniumServerRequestsTimeout() + public function getSeleniumServerRequestsTimeout(): int { return $this->parameters['seleniumServerRequestsTimeout']; } /** * Get test id (generated internally) - * - * @return string */ - public function getTestId() + public function getTestId(): string { return $this->testId; } /** * Get Selenium2 current session id - * - * @return string */ - public function getSessionId() + public function getSessionId(): string { if ($this->session) { return $this->session->id(); @@ -563,11 +491,9 @@ public function waitUntil($callback, $timeout = null) * * @see KeysHolder * - * @param string $name - * * @throws \PHPUnit\Extensions\Selenium2TestCase\Exception */ - public function keysSpecial($name) + public function keysSpecial(string $name): void { $names = explode(',', $name); @@ -586,6 +512,8 @@ public function setUpPage() /** * Check whether an alert box is present + * + * @return true|null */ public function alertIsPresent() { diff --git a/Tests/Selenium2TestCase/MultipleBrowsersPropertyTest.php b/Tests/Selenium2TestCase/MultipleBrowsersPropertyTest.php index 9e4d8646..a35ed012 100644 --- a/Tests/Selenium2TestCase/MultipleBrowsersPropertyTest.php +++ b/Tests/Selenium2TestCase/MultipleBrowsersPropertyTest.php @@ -91,7 +91,7 @@ public function setUp(): void $this->setBrowserUrl(PHPUNIT_TESTSUITE_EXTENSION_SELENIUM_TESTS_URL); } - public function setupSpecificBrowser($params) + public function setupSpecificBrowser(array $params): void { $this->_browserWeSetUp = $params['browserName']; parent::setupSpecificBrowser($params); From dede92e3119950b715a4aac5f2db9f325e7f39e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Fri, 20 Mar 2020 21:24:46 +0100 Subject: [PATCH 08/37] Add type hints in Driver --- PHPUnit/Extensions/Selenium2TestCase/Driver.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase/Driver.php b/PHPUnit/Extensions/Selenium2TestCase/Driver.php index 79b9815d..8bc55406 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Driver.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Driver.php @@ -27,7 +27,7 @@ public function __construct(URL $seleniumServerUrl, $timeout = 60) $this->seleniumServerRequestsTimeout = $timeout; } - public function startSession(array $desiredCapabilities, URL $browserUrl) + public function startSession(array $desiredCapabilities, URL $browserUrl): Session { $sessionCreation = $this->seleniumServerUrl->descend('/wd/hub/session'); $response = $this->curl('POST', $sessionCreation, ['desiredCapabilities' => $desiredCapabilities,]); @@ -54,7 +54,7 @@ public function startSession(array $desiredCapabilities, URL $browserUrl) * @param string $url * @param array $params JSON parameters for POST requests */ - public function curl($httpMethod, URL $url, $params = null) + public function curl(string $httpMethod, URL $url, ?array $params = null): Response { $curl = curl_init($url->getValue()); curl_setopt($curl, CURLOPT_TIMEOUT, $this->seleniumServerRequestsTimeout); @@ -135,7 +135,7 @@ public function curl($httpMethod, URL $url, $params = null) return new Response($content, $info); } - public function execute(Command $command) + public function execute(Command $command): Response { return $this->curl( $command->httpMethod(), From e063dee8e565b35d5b39b1996f0bba4a458bb61e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Fri, 20 Mar 2020 21:27:15 +0100 Subject: [PATCH 09/37] Add type hints in SessionStrategy --- PHPUnit/Extensions/Selenium2TestCase/SessionStrategy.php | 6 +++--- .../Selenium2TestCase/SessionStrategy/Isolated.php | 6 +++--- .../Extensions/Selenium2TestCase/SessionStrategy/Shared.php | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy.php b/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy.php index d6ba909f..1eb6fd23 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy.php @@ -22,9 +22,9 @@ interface SessionStrategy 'browser' => a browser name * 'browserUrl' => base URL to use during the test */ - public function session(array $parameters); + public function session(array $parameters): Session; - public function notSuccessfulTest(); + public function notSuccessfulTest(): void; - public function endOfTest(?Session $session = null); + public function endOfTest(?Session $session = null): void; } diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy/Isolated.php b/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy/Isolated.php index 6493621a..20a556b6 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy/Isolated.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy/Isolated.php @@ -20,7 +20,7 @@ */ class Isolated implements SessionStrategy { - public function session(array $parameters) + public function session(array $parameters): Session { $seleniumServerUrl = URL::fromHostAndPort($parameters['host'], $parameters['port'], $parameters['secure']); $driver = new Driver($seleniumServerUrl, $parameters['seleniumServerRequestsTimeout']); @@ -34,11 +34,11 @@ public function session(array $parameters) return $driver->startSession($capabilities, $parameters['browserUrl']); } - public function notSuccessfulTest() + public function notSuccessfulTest(): void { } - public function endOfTest(?Session $session = null) + public function endOfTest(?Session $session = null): void { if ($session !== null) { $session->stop(); diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy/Shared.php b/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy/Shared.php index 86eec97d..b9474137 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy/Shared.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy/Shared.php @@ -30,7 +30,7 @@ public function __construct(SessionStrategy $originalStrategy, $keepSessionOnFai $this->keepSessionOnFailure = $keepSessionOnFailure; } - public function session(array $parameters) + public function session(array $parameters): Session { if ($this->lastTestWasNotSuccessful && ! $this->keepSessionOnFailure) { if ($this->session !== null) { @@ -51,12 +51,12 @@ public function session(array $parameters) return $this->session; } - public function notSuccessfulTest() + public function notSuccessfulTest(): void { $this->lastTestWasNotSuccessful = true; } - public function endOfTest(?Session $session = null) + public function endOfTest(?Session $session = null): void { } } From 011c72f1389bb00d183302653db800ac4d897b2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Fri, 20 Mar 2020 21:35:21 +0100 Subject: [PATCH 10/37] Add type hints in Accessor --- .../Extensions/Selenium2TestCase/Element.php | 2 +- .../Selenium2TestCase/Element/Accessor.php | 56 +++++-------------- .../Extensions/Selenium2TestCase/Session.php | 5 +- 3 files changed, 15 insertions(+), 48 deletions(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase/Element.php b/PHPUnit/Extensions/Selenium2TestCase/Element.php index faeeeb31..6881b751 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Element.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Element.php @@ -93,7 +93,7 @@ protected function initCommands() ]; } - protected function getSessionUrl() + protected function getSessionUrl(): URL { return $this->url->ascend()->ascend(); } diff --git a/PHPUnit/Extensions/Selenium2TestCase/Element/Accessor.php b/PHPUnit/Extensions/Selenium2TestCase/Element/Accessor.php index 927d9cae..9625026d 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Element/Accessor.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Element/Accessor.php @@ -22,88 +22,69 @@ abstract class Accessor extends CommandsHolder { /** * @param string $value e.g. 'container' - * - * @return Element */ - public function byClassName($value) + public function byClassName(string $value): Element { return $this->by('class name', $value); } /** * @param string $value e.g. 'div.container' - * - * @return Element */ - public function byCssSelector($value) + public function byCssSelector(string $value): Element { return $this->by('css selector', $value); } /** * @param string $value e.g. 'uniqueId' - * - * @return Element */ - public function byId($value) + public function byId(string $value): Element { return $this->by('id', $value); } /** * @param string $value e.g. 'Link text' - * - * @return Element */ - public function byLinkText($value) + public function byLinkText(string $value): Element { return $this->by('link text', $value); } /** * @param string $value e.g. 'Link te' - * - * @return Element */ - public function byPartialLinkText($value) + public function byPartialLinkText(string $value): Element { return $this->by('partial link text', $value); } /** * @param string $value e.g. 'email_address' - * - * @return Element */ - public function byName($value) + public function byName(string $value): Element { return $this->by('name', $value); } /** * @param string $value e.g. 'body' - * - * @return Element */ - public function byTag($value) + public function byTag(string $value): Element { return $this->by('tag name', $value); } /** * @param string $value e.g. '/div[@attribute="value"]' - * - * @return Element */ - public function byXPath($value) + public function byXPath(string $value): Element { return $this->by('xpath', $value); } - /** - * @return Element - */ - public function element(ElementCriteria $criteria) + public function element(ElementCriteria $criteria): Element { $value = $this->postCommand('element', $criteria); @@ -113,7 +94,7 @@ public function element(ElementCriteria $criteria) /** * @return Element[] */ - public function elements(ElementCriteria $criteria) + public function elements(ElementCriteria $criteria): array { $values = $this->postCommand('elements', $criteria); $elements = []; @@ -124,28 +105,17 @@ public function elements(ElementCriteria $criteria) return $elements; } - /** - * @param string $strategy - * - * @return ElementCriteria - */ - public function using($strategy) + public function using(string $strategy): ElementCriteria { return new ElementCriteria($strategy); } - /** - * @return URL - */ - abstract protected function getSessionUrl(); + abstract protected function getSessionUrl(): URL; /** * @param string $strategy supported by JsonWireProtocol element/ command - * @param string $value - * - * @return Element */ - private function by($strategy, $value) + private function by(string $strategy, string $value): Element { return $this->element($this->using($strategy)->value($value)); } diff --git a/PHPUnit/Extensions/Selenium2TestCase/Session.php b/PHPUnit/Extensions/Selenium2TestCase/Session.php index a5381c67..5380d7ce 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Session.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Session.php @@ -157,10 +157,7 @@ public function __destruct() $this->stop(); } - /** - * @return URL - */ - public function getSessionUrl() + public function getSessionUrl(): URL { return $this->url; } From 4cdeb9583f8704205efceb3a95985c43b533dbd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Fri, 20 Mar 2020 21:39:24 +0100 Subject: [PATCH 11/37] Add type hints in Select --- .../Selenium2TestCase/Element/Select.php | 69 +++++++------------ 1 file changed, 24 insertions(+), 45 deletions(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase/Element/Select.php b/PHPUnit/Extensions/Selenium2TestCase/Element/Select.php index 772e55a7..d2c7d618 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Element/Select.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Element/Select.php @@ -18,18 +18,12 @@ */ class Select extends Element { - /** - * @return Select - */ - public static function fromElement(Element $element) + public static function fromElement(Element $element): Select { return new self($element->driver, $element->url); } - /** - * @return string - */ - public function selectedLabel() + public function selectedLabel(): string { $selectedOption = $this->selectedOption(); if ($selectedOption === null) { @@ -39,10 +33,7 @@ public function selectedLabel() return $selectedOption->text(); } - /** - * @return string - */ - public function selectedValue() + public function selectedValue(): string { $selectedOption = $this->selectedOption(); if ($selectedOption === null) { @@ -52,10 +43,7 @@ public function selectedValue() return $selectedOption->value(); } - /** - * @return string - */ - public function selectedId() + public function selectedId(): string { $selectedOption = $this->selectedOption(); if ($selectedOption === null) { @@ -66,9 +54,9 @@ public function selectedId() } /** - * @return array + * @return Element[] */ - public function selectedLabels() + public function selectedLabels(): array { $labels = []; foreach ($this->selectedOptions() as $option) { @@ -78,10 +66,7 @@ public function selectedLabels() return $labels; } - /** - * @return array - */ - public function selectedValues() + public function selectedValues(): array { $values = []; foreach ($this->selectedOptions() as $option) { @@ -91,10 +76,7 @@ public function selectedValues() return $values; } - /** - * @return array - */ - public function selectedIds() + public function selectedIds(): array { $id = []; foreach ($this->selectedOptions() as $option) { @@ -106,10 +88,8 @@ public function selectedIds() /** * @param string $label the text appearing in the option - * - * @return void */ - public function selectOptionByLabel($label) + public function selectOptionByLabel(string $label): void { $toSelect = $this->using('xpath')->value(sprintf(".//option[.='%s']", $label)); $this->selectOptionByCriteria($toSelect); @@ -117,10 +97,8 @@ public function selectOptionByLabel($label) /** * @param string $value the value attribute of the option - * - * @return void */ - public function selectOptionByValue($value) + public function selectOptionByValue(string $value): void { $toSelect = $this->using('xpath')->value(sprintf(".//option[@value='%s']", $value)); $this->selectOptionByCriteria($toSelect); @@ -128,10 +106,8 @@ public function selectOptionByValue($value) /** * @param ElementCriteria $localCriteria condiotions for selecting an option - * - * @return void */ - public function selectOptionByCriteria(ElementCriteria $localCriteria) + public function selectOptionByCriteria(ElementCriteria $localCriteria): void { $option = $this->element($localCriteria); if (! $option->selected()) { @@ -140,9 +116,9 @@ public function selectOptionByCriteria(ElementCriteria $localCriteria) } /** - * @return array + * @return Element[] */ - public function selectOptionValues() + public function selectOptionValues(): array { $options = []; foreach ($this->options() as $option) { @@ -153,9 +129,9 @@ public function selectOptionValues() } /** - * @return array + * @return Element[] */ - public function selectOptionLabels() + public function selectOptionLabels(): array { $options = []; foreach ($this->options() as $option) { @@ -165,10 +141,10 @@ public function selectOptionLabels() return $options; } - /*** - * @return array + /** + * @return Element[] */ - private function selectedOptions() + private function selectedOptions(): array { $options = []; foreach ($this->options() as $option) { @@ -180,14 +156,14 @@ private function selectedOptions() return $options; } - public function clearSelectedOptions() + public function clearSelectedOptions(): void { foreach ($this->selectedOptions() as $option) { $option->click(); } } - private function selectedOption() + private function selectedOption(): ?Element { foreach ($this->options() as $option) { if ($option->selected()) { @@ -198,7 +174,10 @@ private function selectedOption() return null; } - private function options() + /** + * @return Element[] + */ + private function options(): array { $onlyTheOptions = $this->using('css selector')->value('option'); From 809d00ee6d533c196b1495bf3a547133049644d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Fri, 20 Mar 2020 21:44:38 +0100 Subject: [PATCH 12/37] Add type hints in Element --- .../Extensions/Selenium2TestCase/Element.php | 25 +++++-------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase/Element.php b/PHPUnit/Extensions/Selenium2TestCase/Element.php index 6881b751..18a39e7a 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Element.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Element.php @@ -41,11 +41,9 @@ class Element extends Accessor { /** - * @return \self - * * @throws InvalidArgumentException */ - public static function fromResponseValue(array $value, URL $parentFolder, Driver $driver) + public static function fromResponseValue(array $value, URL $parentFolder, Driver $driver): Element { if (! isset($value['ELEMENT'])) { throw new InvalidArgumentException('Element not found.'); @@ -56,10 +54,7 @@ public static function fromResponseValue(array $value, URL $parentFolder, Driver return new self($driver, $url); } - /** - * @return int - */ - public function getId() + public function getId(): int { return $this->url->lastSegment(); } @@ -98,7 +93,7 @@ protected function getSessionUrl(): URL return $this->url->ascend()->ascend(); } - private function touchCommandFactoryMethod($urlSegment) + private function touchCommandFactoryMethod(string $urlSegment): callable { $url = $this->getSessionUrl()->addCommand($urlSegment); $self = $this; @@ -116,20 +111,16 @@ private function touchCommandFactoryMethod($urlSegment) /** * Retrieves the tag name - * - * @return string */ - public function name() + public function name(): string { return strtolower(parent::name()); } /** * Generates an array that is structured as the WebDriver Object of the JSONWireProtocoll - * - * @return array */ - public function toWebDriverObject() + public function toWebDriverObject(): array { return ['ELEMENT' => (string) $this->getId()]; } @@ -141,12 +132,8 @@ public function toWebDriverObject() * * @see https://code.google.com/p/selenium/source/detail?r=953007b48e83f90450f3e41b11ec31e2928f1605 * @see https://code.google.com/p/selenium/source/browse/java/CHANGELOG - * - * @param string $newValue - * - * @return string|null */ - public function value($newValue = null) + public function value(?string $newValue = null): ?string { if ($newValue !== null) { return parent::value($newValue); From 9a026136e7a1055fbba431f5af800ac529cffa2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Fri, 20 Mar 2020 21:46:40 +0100 Subject: [PATCH 13/37] Add type hints in Cookie --- .../Selenium2TestCase/Session/Cookie.php | 33 +++---------------- 1 file changed, 5 insertions(+), 28 deletions(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase/Session/Cookie.php b/PHPUnit/Extensions/Selenium2TestCase/Session/Cookie.php index 4f6100df..ee7f680d 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Session/Cookie.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Session/Cookie.php @@ -28,23 +28,12 @@ public function __construct(Driver $driver, URL $url) $this->url = $url; } - /** - * @param string $name - * @param string $value - * - * @return Builder - */ - public function add($name, $value) + public function add(string $name, string $value): Builder { return new Builder($this, $name, $value); } - /** - * @param string $name - * - * @return string - */ - public function get($name) + public function get(string $name): string { $cookies = $this->driver->curl('GET', $this->url)->getValue(); foreach ($cookies as $cookie) { @@ -56,33 +45,21 @@ public function get($name) throw new \PHPUnit\Extensions\Selenium2TestCase\Exception(sprintf("There is no '%s' cookie available on this page.", $name)); } - /** - * @param string $name - * - * @return void - */ - public function remove($name) + public function remove(string $name): void { $url = $this->url->descend($name); $this->driver->curl('DELETE', $url); } - /** - * @return void - */ - public function clear() + public function clear(): void { $this->driver->curl('DELETE', $this->url); } /** * @internal - * - * @param array $data - * - * @return void */ - public function postCookie(array $data) + public function postCookie(array $data): void { $this->driver->curl( 'POST', From e75e2a1f5d0acb98f6d0bd6a26f06ac5da6b99ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Fri, 20 Mar 2020 21:48:26 +0100 Subject: [PATCH 14/37] Add type hints in Timeouts --- PHPUnit/Extensions/Selenium2TestCase/Session/Timeouts.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase/Session/Timeouts.php b/PHPUnit/Extensions/Selenium2TestCase/Session/Timeouts.php index 0dd00d25..9875bddc 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Session/Timeouts.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Session/Timeouts.php @@ -25,7 +25,7 @@ class Timeouts extends CommandsHolder private $maximumTimeout; private $lastImplicitWaitValue = 0; - public function __construct($driver, URL $url, $maximumTimeout) + public function __construct($driver, URL $url, int $maximumTimeout) { parent::__construct($driver, $url); $this->maximumTimeout = $maximumTimeout; @@ -53,17 +53,17 @@ protected function initCommands() ]; } - public function setLastImplicitWaitValue($implicitWait) + public function setLastImplicitWaitValue(int $implicitWait): void { $this->lastImplicitWaitValue = $implicitWait; } - public function getLastImplicitWaitValue() + public function getLastImplicitWaitValue(): int { return $this->lastImplicitWaitValue; } - public function check($timeout) + public function check($timeout): void { if ($timeout > $this->maximumTimeout) { throw new \PHPUnit\Extensions\Selenium2TestCase\Exception('There is no use in setting this timeout unless you also call $this->setSeleniumServerRequestsTimeout($seconds) in setUp().'); From 13244df7466e70663bdc557d6657bea0661e8d41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Fri, 20 Mar 2020 21:50:19 +0100 Subject: [PATCH 15/37] Add type hints in Builder --- .../Session/Cookie/Builder.php | 38 +++++-------------- 1 file changed, 9 insertions(+), 29 deletions(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase/Session/Cookie/Builder.php b/PHPUnit/Extensions/Selenium2TestCase/Session/Cookie/Builder.php index 1d31f6d3..00e328f4 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Session/Cookie/Builder.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Session/Cookie/Builder.php @@ -11,11 +11,14 @@ namespace PHPUnit\Extensions\Selenium2TestCase\Session\Cookie; // phpcs:disable SlevomatCodingStandard.Classes.UnusedPrivateElements +use PHPUnit\Extensions\Selenium2TestCase\Session\Cookie; + /** * Adds a cookie. */ class Builder { + private $cookieFacade; private $name; private $value; private $path; @@ -23,65 +26,42 @@ class Builder private $secure = false; private $expiry; - public function __construct($cookieFacade, $name, $value) + public function __construct(Cookie $cookieFacade, string $name, string $value) { $this->cookieFacade = $cookieFacade; $this->name = $name; $this->value = $value; } - /** - * @param string $path - * - * @return Builder - */ - public function path($path) + public function path(string $path): self { $this->path = $path; return $this; } - /** - * @param string $domain - * - * @return Builder - */ - public function domain($domain) + public function domain(string $domain): self { $this->domain = $domain; return $this; } - /** - * @param bool $secure - * - * @return Builder - */ - public function secure($secure) + public function secure(bool $secure): self { $this->secure = $secure; return $this; } - /** - * @param int $expiry - * - * @return Builder - */ - public function expiry($expiry) + public function expiry(int $expiry): self { $this->expiry = $expiry; return $this; } - /** - * @return void - */ - public function set() + public function set(): void { $cookieData = [ 'name' => $this->name, From 4fcb8c1d872d09ab861e16848fd40ed17437bcb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Fri, 20 Mar 2020 21:55:57 +0100 Subject: [PATCH 16/37] Add type hints in CommandsHolder --- .../Selenium2TestCase/CommandsHolder.php | 34 +++++++------------ .../Extensions/Selenium2TestCase/Element.php | 4 +-- .../Extensions/Selenium2TestCase/Session.php | 2 +- .../Selenium2TestCase/Session/Timeouts.php | 2 +- .../Extensions/Selenium2TestCase/Window.php | 4 +-- 5 files changed, 18 insertions(+), 28 deletions(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase/CommandsHolder.php b/PHPUnit/Extensions/Selenium2TestCase/CommandsHolder.php index c1edf01c..6e0cd363 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/CommandsHolder.php +++ b/PHPUnit/Extensions/Selenium2TestCase/CommandsHolder.php @@ -22,16 +22,13 @@ abstract class CommandsHolder /** @var Driver */ protected $driver; - /** @var string the API URL for this element, */ + /** @var string the API URL for this element, */ protected $url; - /** - * @var array instances of - * PHPUnit_Extensions_Selenium2TestCase_ElementCommand - */ + /** @var array instances of PHPUnit_Extensions_Selenium2TestCase_ElementCommand */ protected $commands; - public function __construct($driver, URL $url) + public function __construct(Driver $driver, URL $url) { $this->driver = $driver; $this->url = $url; @@ -48,10 +45,9 @@ public function __construct($driver, URL $url) } /** - * @return array class names, or - * callables of the form function($parameter, $commandUrl) + * @return array class names, or callables of the form function($parameter, $commandUrl) */ - abstract protected function initCommands(); + abstract protected function initCommands(): array; public function __call($commandName, $arguments) { @@ -61,7 +57,7 @@ public function __call($commandName, $arguments) return $response->getValue(); } - protected function postCommand($name, ElementCriteria $criteria) + protected function postCommand(string $name, ElementCriteria $criteria) { $response = $this->driver->curl( 'POST', @@ -73,18 +69,16 @@ protected function postCommand($name, ElementCriteria $criteria) } /** - * @return callable - * - * @params string $commandClass a class name, descending from Command + * @param string $commandClass a class name, descending from Command */ - private function factoryMethod($commandClass) + private function factoryMethod(string $commandClass): callable { return static function ($jsonParameters, $url) use ($commandClass) { return new $commandClass($jsonParameters, $url); }; } - private function extractJsonParameters($arguments) + private function extractJsonParameters(array $arguments) { $this->checkArguments($arguments); @@ -95,7 +89,7 @@ private function extractJsonParameters($arguments) return $arguments[0]; } - private function checkArguments($arguments) + private function checkArguments(array $arguments): void { if (count($arguments) > 1) { throw new Exception('You cannot call a command with multiple method arguments.'); @@ -103,13 +97,9 @@ private function checkArguments($arguments) } /** - * @param string $commandName The called method name - * defined as a key in initCommands() - * @param array $jsonParameters - * - * @return Command + * @param string $commandName The called method name defined as a key in initCommands() */ - protected function newCommand($commandName, $jsonParameters) + protected function newCommand(string $commandName, array $jsonParameters): Command { if (isset($this->commands[$commandName])) { $factoryMethod = $this->commands[$commandName]; diff --git a/PHPUnit/Extensions/Selenium2TestCase/Element.php b/PHPUnit/Extensions/Selenium2TestCase/Element.php index 18a39e7a..daa362e8 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Element.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Element.php @@ -60,9 +60,9 @@ public function getId(): int } /** - * @return array class names + * @return array class names */ - protected function initCommands() + protected function initCommands(): array { return [ 'attribute' => Attribute::class, diff --git a/PHPUnit/Extensions/Selenium2TestCase/Session.php b/PHPUnit/Extensions/Selenium2TestCase/Session.php index 5380d7ce..d380fc4e 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Session.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Session.php @@ -92,7 +92,7 @@ public function id() return $this->url->lastSegment(); } - protected function initCommands() + protected function initCommands(): array { $baseUrl = $this->baseUrl; diff --git a/PHPUnit/Extensions/Selenium2TestCase/Session/Timeouts.php b/PHPUnit/Extensions/Selenium2TestCase/Session/Timeouts.php index 9875bddc..162b2808 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Session/Timeouts.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Session/Timeouts.php @@ -31,7 +31,7 @@ public function __construct($driver, URL $url, int $maximumTimeout) $this->maximumTimeout = $maximumTimeout; } - protected function initCommands() + protected function initCommands(): array { $self = $this; diff --git a/PHPUnit/Extensions/Selenium2TestCase/Window.php b/PHPUnit/Extensions/Selenium2TestCase/Window.php index d2d0d37d..88b055fc 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Window.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Window.php @@ -22,9 +22,9 @@ class Window extends CommandsHolder { /** - * @return array class names + * @return array class names */ - protected function initCommands() + protected function initCommands(): array { return [ 'size' => StateCommand::class, From bd50d49a680fd4d4871620a5d15e84af15307034 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Fri, 20 Mar 2020 21:58:01 +0100 Subject: [PATCH 17/37] Add type hints in ElementCriteria --- PHPUnit/Extensions/Selenium2TestCase/ElementCriteria.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase/ElementCriteria.php b/PHPUnit/Extensions/Selenium2TestCase/ElementCriteria.php index 33b8c6d8..e3e7b30d 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ElementCriteria.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ElementCriteria.php @@ -19,15 +19,12 @@ */ class ElementCriteria extends ArrayObject { - public function __construct($strategy) + public function __construct(string $strategy) { $this['using'] = $strategy; } - /** - * @return ElementCriteria - */ - public function value($searchTarget) + public function value(string $searchTarget): ElementCriteria { $this['value'] = $searchTarget; From 01e06257498f750c4b28dce5a178e03ebfbb97fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Fri, 20 Mar 2020 21:58:47 +0100 Subject: [PATCH 18/37] Add type hints in KeysHolder --- PHPUnit/Extensions/Selenium2TestCase/KeysHolder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase/KeysHolder.php b/PHPUnit/Extensions/Selenium2TestCase/KeysHolder.php index bc9d48ce..01e4380e 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/KeysHolder.php +++ b/PHPUnit/Extensions/Selenium2TestCase/KeysHolder.php @@ -75,7 +75,7 @@ class KeysHolder 'command' => "\xEE\x80\xBD", ]; - public function specialKey($name) + public function specialKey(string $name): string { $normalizedName = strtolower($name); From 0d3b8579ca37604f0434ac238d5d4a3f284fb671 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Fri, 20 Mar 2020 21:59:39 +0100 Subject: [PATCH 19/37] Add type hints in Response --- PHPUnit/Extensions/Selenium2TestCase/Response.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase/Response.php b/PHPUnit/Extensions/Selenium2TestCase/Response.php index 648cb6be..25fd61c1 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Response.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Response.php @@ -15,13 +15,13 @@ */ class Response { - /** @var array decoded response */ + /** @var array decoded response */ private $jsonResponse; - /** @var array CURL info for the response. */ + /** @var array CURL info for the response. */ private $info; - public function __construct($jsonResponse, $info) + public function __construct(array $jsonResponse, array $info) { $this->jsonResponse = $jsonResponse; $this->info = $info; @@ -34,10 +34,7 @@ public function getValue() } } - /** - * @return URL - */ - public function getURL() + public function getURL(): URL { $url = $this->info['url']; $sessionId = $this->jsonResponse['sessionId']; From 91ba6ccd80e60f5d7b917f0aa1e2f2a4b9e88176 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Fri, 20 Mar 2020 22:00:21 +0100 Subject: [PATCH 20/37] Add type hints in ScreenshotListener --- PHPUnit/Extensions/Selenium2TestCase/ScreenshotListener.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase/ScreenshotListener.php b/PHPUnit/Extensions/Selenium2TestCase/ScreenshotListener.php index 3be45857..3fbfd268 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ScreenshotListener.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ScreenshotListener.php @@ -26,7 +26,7 @@ class ScreenshotListener implements TestListener private $directory; - public function __construct($directory) + public function __construct(string $directory) { $this->directory = $directory; } @@ -41,7 +41,7 @@ public function addFailure(Test $test, AssertionFailedError $e, float $time): vo $this->storeAScreenshot($test); } - private function storeAScreenshot(Test $test) + private function storeAScreenshot(Test $test): void { if ($test instanceof Selenium2TestCase) { From 58d3aad63beaffb597a52d5023e750165d263988 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Fri, 20 Mar 2020 22:03:51 +0100 Subject: [PATCH 21/37] Add type hints in Session --- .../Extensions/Selenium2TestCase/Session.php | 64 ++++++------------- 1 file changed, 19 insertions(+), 45 deletions(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase/Session.php b/PHPUnit/Extensions/Selenium2TestCase/Session.php index d380fc4e..23ba25c0 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Session.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Session.php @@ -61,10 +61,7 @@ */ class Session extends Accessor { - /** - * @var string the base URL for this session, - * which all relative URLs will refer to - */ + /** @var string the base URL for this session, which all relative URLs will refer to */ private $baseUrl; /** @var Timeouts */ @@ -74,7 +71,7 @@ class Session extends Accessor private $stopped = false; public function __construct( - $driver, + Driver $driver, URL $url, URL $baseUrl, Timeouts $timeouts @@ -84,10 +81,7 @@ public function __construct( parent::__construct($driver, $url); } - /** - * @return string - */ - public function id() + public function id(): string { return $this->url->lastSegment(); } @@ -134,7 +128,7 @@ protected function initCommands(): array ]; } - private function attributeCommandFactoryMethod($urlSegment) + private function attributeCommandFactoryMethod(string $urlSegment): callable { $url = $this->url->addCommand($urlSegment); @@ -143,7 +137,7 @@ private function attributeCommandFactoryMethod($urlSegment) }; } - private function touchCommandFactoryMethod($urlSegment) + private function touchCommandFactoryMethod(string $urlSegment): callable { $url = $this->url->addCommand($urlSegment); @@ -164,10 +158,8 @@ public function getSessionUrl(): URL /** * Closed the browser. - * - * @return void */ - public function stop() + public function stop(): void { if ($this->stopped) { return; @@ -186,10 +178,7 @@ public function stop() } } - /** - * @return Select - */ - public function select(Element $element) + public function select(Element $element): Select { $tag = $element->name(); if ($tag !== 'select') { @@ -201,58 +190,49 @@ public function select(Element $element) /** * @param array $value WebElement JSON object - * - * @return Element */ - public function elementFromResponseValue($value) + public function elementFromResponseValue(array $value): Element { return Element::fromResponseValue($value, $this->getSessionUrl()->descend('element'), $this->driver); } /** * @param string $id id attribute, e.g. 'container' - * - * @return void */ - public function clickOnElement($id) + public function clickOnElement(string $id): void { $this->element($this->using('id')->value($id))->click(); } - public function timeouts() + public function timeouts(): Timeouts { return $this->timeouts; } /** - * @return string a BLOB of a PNG file + * @return string a BLOB of a PNG file */ - public function currentScreenshot() + public function currentScreenshot(): string { return base64_decode($this->screenshot()); } - /** - * @return Window - */ - public function currentWindow() + public function currentWindow(): Window { $url = $this->url->descend('window')->descend(trim($this->windowHandle(), '{}')); return new Window($this->driver, $url); } - public function closeWindow() + public function closeWindow(): void { $this->driver->curl('DELETE', $this->url->descend('window')); } /** * Get the element on the page that currently has focus. - * - * @return Element */ - public function active() + public function active(): Element { $command = new Active(null, $this->url); $response = $this->driver->execute($command); @@ -260,32 +240,26 @@ public function active() return $this->elementFromResponseValue($response->getValue()); } - /** - * @return Cookie - */ - public function cookie() + public function cookie(): Cookie { $url = $this->url->descend('cookie'); return new Cookie($this->driver, $url); } - /** - * @return Storage - */ - public function localStorage() + public function localStorage(): Storage { $url = $this->url->addCommand('localStorage'); return new Storage($this->driver, $url); } - public function landscape() + public function landscape(): void { $this->orientation('LANDSCAPE'); } - public function portrait() + public function portrait(): void { $this->orientation('PORTRAIT'); } From ed922580e38b552942a6fd3276bdd0b1e6eca0a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Fri, 20 Mar 2020 22:06:08 +0100 Subject: [PATCH 22/37] Add type hints in URL --- PHPUnit/Extensions/Selenium2TestCase/URL.php | 55 ++++---------------- 1 file changed, 11 insertions(+), 44 deletions(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase/URL.php b/PHPUnit/Extensions/Selenium2TestCase/URL.php index 7021e3e2..f8e68027 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/URL.php +++ b/PHPUnit/Extensions/Selenium2TestCase/URL.php @@ -18,22 +18,13 @@ final class URL /** @var string */ private $value; - /** - * @param string $value - */ - public function __construct($value) + /** @param string $value */ + public function __construct(string $value) { $this->value = $value; } - /** - * @param string $host - * @param int $port - * @param bool $secure - * - * @return URL - */ - public static function fromHostAndPort($host, $port, $secure) + public static function fromHostAndPort(string $host, int $port, bool $secure): URL { $prefix = 'http://'; if ($secure) { @@ -43,10 +34,7 @@ public static function fromHostAndPort($host, $port, $secure) return new self($prefix . $host . ':' . $port); } - /** - * @return string - */ - public function getValue() + public function getValue(): string { return $this->value; } @@ -56,12 +44,7 @@ public function __toString() return $this->getValue(); } - /** - * @param string $addition - * - * @return URL - */ - public function descend($addition) + public function descend(string $addition): URL { if ($addition === '') { // if we're adding nothing, respect the current url's choice of @@ -77,10 +60,7 @@ public function descend($addition) return new self($newValue); } - /** - * @return URL - */ - public function ascend() + public function ascend(): URL { $lastSlash = strrpos($this->value, '/'); $newValue = substr($this->value, 0, $lastSlash); @@ -88,32 +68,19 @@ public function ascend() return new self($newValue); } - /** - * @return string - */ - public function lastSegment() + public function lastSegment(): string { $segments = explode('/', $this->value); return end($segments); } - /** - * @param string $command - * - * @return URL - */ - public function addCommand($command) + public function addCommand(string $command): URL { return $this->descend($this->camelCaseToUnderScores($command)); } - /** - * @param string $newUrl - * - * @return URL - */ - public function jump($newUrl) + public function jump(string $newUrl): URL { if ($this->isAbsolute($newUrl)) { return new self($newUrl); @@ -122,7 +89,7 @@ public function jump($newUrl) } } - private function camelCaseToUnderScores($string) + private function camelCaseToUnderScores(string $string): string { $string = preg_replace('/([A-Z]{1,1})/', ' \1', $string); $string = strtolower($string); @@ -130,7 +97,7 @@ private function camelCaseToUnderScores($string) return str_replace(' ', '_', $string); } - private function isAbsolute($urlValue) + private function isAbsolute(string $urlValue): bool { return preg_match('/^(http|https):\/\//', $urlValue) > 0; } From 570891d4b693d1b5c84a557f554bfdbea02501a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Fri, 20 Mar 2020 22:07:30 +0100 Subject: [PATCH 23/37] Add type hints in WaitUntil --- PHPUnit/Extensions/Selenium2TestCase/WaitUntil.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase/WaitUntil.php b/PHPUnit/Extensions/Selenium2TestCase/WaitUntil.php index 605f2bce..ff6be07a 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/WaitUntil.php +++ b/PHPUnit/Extensions/Selenium2TestCase/WaitUntil.php @@ -42,12 +42,8 @@ public function __construct(Selenium2TestCase $testCase) * @throws \PHPUnit\Extensions\Selenium2TestCase\Exception * @throws WebDriverException */ - public function run($callback, $timeout = null, $sleepInterval = null) + public function run(callable $callback, ?int $timeout = null, ?int $sleepInterval = null) { - if (! is_callable($callback)) { - throw new \PHPUnit\Extensions\Selenium2TestCase\Exception('The valid callback is expected'); - } - // if there was an implicit timeout specified - remember it and temporarily turn it off $implicitWait = $this->testCase->timeouts()->getLastImplicitWaitValue(); if ($implicitWait) { From 97ffcbb594efe304782c9f4fee75391ce064b9f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Fri, 20 Mar 2020 22:10:08 +0100 Subject: [PATCH 24/37] Add type hints in Command --- PHPUnit/Extensions/Selenium2TestCase/Command.php | 10 ++++------ .../ElementCommand/Attribute.php | 10 +++------- .../Selenium2TestCase/ElementCommand/Click.php | 2 +- .../Selenium2TestCase/ElementCommand/Css.php | 10 +++------- .../Selenium2TestCase/ElementCommand/Equals.php | 15 +++------------ .../ElementCommand/GenericAccessor.php | 2 +- .../ElementCommand/GenericPost.php | 2 +- .../Selenium2TestCase/ElementCommand/Rect.php | 10 +++------- .../Selenium2TestCase/ElementCommand/Value.php | 2 +- .../SessionCommand/AcceptAlert.php | 2 +- .../Selenium2TestCase/SessionCommand/Active.php | 2 +- .../SessionCommand/AlertText.php | 2 +- .../Selenium2TestCase/SessionCommand/Click.php | 2 +- .../SessionCommand/DismissAlert.php | 2 +- .../Selenium2TestCase/SessionCommand/File.php | 2 +- .../Selenium2TestCase/SessionCommand/Frame.php | 2 +- .../SessionCommand/GenericAccessor.php | 2 +- .../SessionCommand/GenericAttribute.php | 2 +- .../Selenium2TestCase/SessionCommand/Keys.php | 2 +- .../Selenium2TestCase/SessionCommand/Location.php | 2 +- .../Selenium2TestCase/SessionCommand/Log.php | 2 +- .../Selenium2TestCase/SessionCommand/MoveTo.php | 2 +- .../SessionCommand/Orientation.php | 2 +- .../Selenium2TestCase/SessionCommand/Url.php | 2 +- .../Selenium2TestCase/SessionCommand/Window.php | 2 +- .../Extensions/Selenium2TestCase/StateCommand.php | 2 +- 26 files changed, 37 insertions(+), 60 deletions(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase/Command.php b/PHPUnit/Extensions/Selenium2TestCase/Command.php index 879ad179..fcf16b2c 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/Command.php +++ b/PHPUnit/Extensions/Selenium2TestCase/Command.php @@ -18,11 +18,12 @@ abstract class Command { protected $jsonParameters; + private $url; /** * @param array $jsonParameters null in case of no parameters */ - public function __construct($jsonParameters, URL $url) + public function __construct(?array $jsonParameters, URL $url) { if (! is_array($jsonParameters) && $jsonParameters !== null) { throw new InvalidArgumentException('The JSON parameters must be an array, or a NULL value in case they are not required.'); @@ -32,15 +33,12 @@ public function __construct($jsonParameters, URL $url) $this->url = $url; } - public function url() + public function url(): URL { return $this->url; } - /** - * @return string - */ - abstract public function httpMethod(); + abstract public function httpMethod(): string; public function jsonParameters() { diff --git a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Attribute.php b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Attribute.php index 16997e76..6b3f7e71 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Attribute.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Attribute.php @@ -18,16 +18,12 @@ */ class Attribute extends Command { - /** - * @param array $parameter - */ - public function __construct($parameter, URL $attributeResourceBaseUrl) + public function __construct(string $parameter, URL $attributeResourceBaseUrl) { - $this->jsonParameters = []; - $this->url = $attributeResourceBaseUrl->descend($parameter); + parent::__construct([], $attributeResourceBaseUrl->descend($parameter)); } - public function httpMethod() + public function httpMethod(): string { return 'GET'; } diff --git a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Click.php b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Click.php index b6137e61..e1dee42c 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Click.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Click.php @@ -17,7 +17,7 @@ */ class Click extends Command { - public function httpMethod() + public function httpMethod(): string { return 'POST'; } diff --git a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Css.php b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Css.php index a33756c0..9436520c 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Css.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Css.php @@ -18,16 +18,12 @@ */ class Css extends Command { - /** - * @param array $propertyName - */ - public function __construct($propertyName, URL $cssResourceBaseUrl) + public function __construct(string $propertyName, URL $cssResourceBaseUrl) { - $this->jsonParameters = []; - $this->url = $cssResourceBaseUrl->descend($propertyName); + parent::__construct([], $cssResourceBaseUrl->descend($propertyName)); } - public function httpMethod() + public function httpMethod(): string { return 'GET'; } diff --git a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Equals.php b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Equals.php index da44de29..4447aa14 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Equals.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Equals.php @@ -10,7 +10,6 @@ namespace PHPUnit\Extensions\Selenium2TestCase\ElementCommand; -use InvalidArgumentException; use PHPUnit\Extensions\Selenium2TestCase\Command; use PHPUnit\Extensions\Selenium2TestCase\Element; use PHPUnit\Extensions\Selenium2TestCase\URL; @@ -20,20 +19,12 @@ */ class Equals extends Command { - /** - * @param array $parameter - */ - public function __construct($parameter, URL $equalsResourceBaseUrl) + public function __construct(Element $parameter, URL $equalsResourceBaseUrl) { - $this->jsonParameters = []; - if (! ($parameter instanceof Element)) { - throw new InvalidArgumentException('Elements can only test equality with other Element instances.'); - } - - $this->url = $equalsResourceBaseUrl->descend($parameter->getId()); + parent::__construct([], $equalsResourceBaseUrl->descend($parameter->getId())); } - public function httpMethod() + public function httpMethod(): string { return 'GET'; } diff --git a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/GenericAccessor.php b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/GenericAccessor.php index 73ccb35d..5a509deb 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/GenericAccessor.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/GenericAccessor.php @@ -18,7 +18,7 @@ */ class GenericAccessor extends Command { - public function httpMethod() + public function httpMethod(): string { return 'GET'; } diff --git a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/GenericPost.php b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/GenericPost.php index fa53603b..45509c8a 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/GenericPost.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/GenericPost.php @@ -17,7 +17,7 @@ */ class GenericPost extends Command { - public function httpMethod() + public function httpMethod(): string { return 'POST'; } diff --git a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Rect.php b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Rect.php index dec96b3a..faa20ccb 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Rect.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Rect.php @@ -18,16 +18,12 @@ */ class Rect extends Command { - /** - * @param array $parameter - */ - public function __construct($parameter, URL $attributeResourceBaseUrl) + public function __construct(string $parameter, URL $attributeResourceBaseUrl) { - $this->jsonParameters = []; - $this->url = $attributeResourceBaseUrl->descend($parameter); + parent::__construct([], $attributeResourceBaseUrl->descend($parameter)); } - public function httpMethod() + public function httpMethod(): string { return 'GET'; } diff --git a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Value.php b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Value.php index ee9dbe6a..8d64b175 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Value.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Value.php @@ -18,7 +18,7 @@ */ class Value extends Keys { - public function httpMethod() + public function httpMethod(): string { if ($this->jsonParameters) { return 'POST'; diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AcceptAlert.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AcceptAlert.php index b07152b7..6255e1aa 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AcceptAlert.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AcceptAlert.php @@ -17,7 +17,7 @@ */ class AcceptAlert extends Command { - public function httpMethod() + public function httpMethod(): string { return 'POST'; } diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Active.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Active.php index df108ec7..d474aad0 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Active.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Active.php @@ -24,7 +24,7 @@ public function __construct($jsonParameters, URL $url) parent::__construct($jsonParameters, $url); } - public function httpMethod() + public function httpMethod(): string { return 'POST'; } diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AlertText.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AlertText.php index 4e41b1a7..784b7c91 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AlertText.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AlertText.php @@ -32,7 +32,7 @@ public function __construct($argument, URL $url) parent::__construct($jsonParameters, $url); } - public function httpMethod() + public function httpMethod(): string { if ($this->jsonParameters) { return 'POST'; diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Click.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Click.php index e0fb301c..7be7335f 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Click.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Click.php @@ -40,7 +40,7 @@ public function __construct($argument, URL $url) parent::__construct($jsonParameters, $url); } - public function httpMethod() + public function httpMethod(): string { return 'POST'; } diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/DismissAlert.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/DismissAlert.php index 89ad41f2..4540166f 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/DismissAlert.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/DismissAlert.php @@ -17,7 +17,7 @@ */ class DismissAlert extends Command { - public function httpMethod() + public function httpMethod(): string { return 'POST'; } diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/File.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/File.php index d6f3f27e..f36c72b5 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/File.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/File.php @@ -45,7 +45,7 @@ public function __construct($argument, URL $url) unlink($zipfilePath); } - public function httpMethod() + public function httpMethod(): string { return 'POST'; } diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Frame.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Frame.php index 4f986fed..8c42195d 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Frame.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Frame.php @@ -50,7 +50,7 @@ private function isElement($id) return $id instanceof Element; } - public function httpMethod() + public function httpMethod(): string { return 'POST'; } diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/GenericAccessor.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/GenericAccessor.php index d1c5ea59..5562d0a2 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/GenericAccessor.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/GenericAccessor.php @@ -17,7 +17,7 @@ */ class GenericAccessor extends Command { - public function httpMethod() + public function httpMethod(): string { return 'GET'; } diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/GenericAttribute.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/GenericAttribute.php index ae97c2a3..485fae3f 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/GenericAttribute.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/GenericAttribute.php @@ -17,7 +17,7 @@ */ class GenericAttribute extends Command { - public function httpMethod() + public function httpMethod(): string { if ($this->jsonParameters) { return 'POST'; diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Keys.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Keys.php index d6b0ec39..30dd24fb 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Keys.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Keys.php @@ -32,7 +32,7 @@ public function __construct($jsonParameters, URL $url) /** * @return string */ - public function httpMethod() + public function httpMethod(): string { return 'POST'; } diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Location.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Location.php index af481245..4284c2e3 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Location.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Location.php @@ -26,7 +26,7 @@ public function __construct($location, $commandUrl) parent::__construct($jsonParameters, $commandUrl); } - public function httpMethod() + public function httpMethod(): string { if ($this->jsonParameters) { return 'POST'; diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Log.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Log.php index 2428106d..10e65c8b 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Log.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Log.php @@ -23,7 +23,7 @@ public function __construct($type, $commandUrl) parent::__construct($jsonParameters, $commandUrl); } - public function httpMethod() + public function httpMethod(): string { return 'POST'; } diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/MoveTo.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/MoveTo.php index 6d0a0d0e..1c1e6c6b 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/MoveTo.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/MoveTo.php @@ -53,7 +53,7 @@ public function __construct($element, URL $url) /** * @return string */ - public function httpMethod() + public function httpMethod(): string { return 'POST'; } diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Orientation.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Orientation.php index 0a211463..7a99d38d 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Orientation.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Orientation.php @@ -26,7 +26,7 @@ public function __construct($orientation, $commandUrl) parent::__construct($jsonParameters, $commandUrl); } - public function httpMethod() + public function httpMethod(): string { if ($this->jsonParameters) { return 'POST'; diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Url.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Url.php index 560faebd..09bb8cfb 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Url.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Url.php @@ -30,7 +30,7 @@ public function __construct($url, $commandUrl, SeleniumURL $baseUrl) parent::__construct($jsonParameters, $commandUrl); } - public function httpMethod() + public function httpMethod(): string { if ($this->jsonParameters) { return 'POST'; diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Window.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Window.php index 5a737457..4936cb90 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Window.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Window.php @@ -23,7 +23,7 @@ public function __construct($name, $commandUrl) parent::__construct($jsonParameters, $commandUrl); } - public function httpMethod() + public function httpMethod(): string { return 'POST'; } diff --git a/PHPUnit/Extensions/Selenium2TestCase/StateCommand.php b/PHPUnit/Extensions/Selenium2TestCase/StateCommand.php index c487c8bb..6d72b361 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/StateCommand.php +++ b/PHPUnit/Extensions/Selenium2TestCase/StateCommand.php @@ -15,7 +15,7 @@ */ class StateCommand extends Command { - public function httpMethod() + public function httpMethod(): string { if ($this->jsonParameters) { return 'POST'; From c6cf9f990a2e04936917ac0c5350b782b3312db7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Fri, 20 Mar 2020 22:14:53 +0100 Subject: [PATCH 25/37] Add type hints in Active --- PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Active.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Active.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Active.php index d474aad0..58a1ff98 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Active.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Active.php @@ -18,7 +18,7 @@ */ class Active extends Command { - public function __construct($jsonParameters, URL $url) + public function __construct(?array $jsonParameters, URL $url) { $url = $url->addCommand('element')->addCommand('active'); parent::__construct($jsonParameters, $url); From 097f0f824a4fe4615140ac9bbee51376cdd4cac1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Fri, 20 Mar 2020 22:16:14 +0100 Subject: [PATCH 26/37] Add type hints in AlertText --- .../Selenium2TestCase/SessionCommand/AlertText.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AlertText.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AlertText.php index 784b7c91..204cfac4 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AlertText.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AlertText.php @@ -10,7 +10,6 @@ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; -use BadMethodCallException; use PHPUnit\Extensions\Selenium2TestCase\Command; use PHPUnit\Extensions\Selenium2TestCase\URL; @@ -19,14 +18,10 @@ */ class AlertText extends Command { - public function __construct($argument, URL $url) + public function __construct(?string $jsonParameters, URL $url) { - if (is_string($argument)) { - $jsonParameters =['text' => $argument]; - } elseif ($argument === null) { - $jsonParameters = null; - } else { - throw new BadMethodCallException('Wrong parameters for alertText().'); + if ($jsonParameters !== null) { + $jsonParameters = ['text' => $jsonParameters]; } parent::__construct($jsonParameters, $url); From dbeb6553bdf692313c0c72c14d4180402fac658d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Fri, 20 Mar 2020 22:18:13 +0100 Subject: [PATCH 27/37] Add type hints in File --- .../Selenium2TestCase/SessionCommand/File.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/File.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/File.php index f36c72b5..4b8b8127 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/File.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/File.php @@ -25,7 +25,7 @@ class File extends Command /** @var */ private static $zipArchive; - public function __construct($argument, URL $url) + public function __construct(string $argument, URL $url) { if (! is_file($argument)) { throw new BadMethodCallException(sprintf('No such file: %s', $argument)); @@ -40,6 +40,7 @@ public function __construct($argument, URL $url) $file = base64_encode($contents); + parent::__construct(['file' => $file], $url); unlink($zipfilePath); @@ -57,7 +58,7 @@ public function httpMethod(): string * * @return string Generated zip file */ - protected function zipArchiveFile($filePath) + protected function zipArchiveFile(string $filePath): string { // file MUST be readable if (! is_readable($filePath)) { @@ -81,10 +82,8 @@ protected function zipArchiveFile($filePath) /** * Returns a runtime instance of a ZipArchive - * - * @return ZipArchive */ - protected function getZipArchiver() + protected function getZipArchiver(): ZipArchive { // create ZipArchive if necessary if (! static::$zipArchive) { @@ -97,10 +96,8 @@ protected function getZipArchiver() /** * Calls sys_get_temp_dir and ensures that it has a trailing slash * ( behavior varies across systems ) - * - * @return string */ - protected function getTmpDir() + protected function getTmpDir(): string { return rtrim(sys_get_temp_dir(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; } From 826717ffbbf903133444a367841aa453247352bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Fri, 20 Mar 2020 22:19:26 +0100 Subject: [PATCH 28/37] Add type hints in Frame --- .../Extensions/Selenium2TestCase/SessionCommand/Frame.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Frame.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Frame.php index 8c42195d..447071da 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Frame.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Frame.php @@ -18,7 +18,7 @@ */ class Frame extends Command { - public function __construct($id, $commandUrl) + public function __construct($id, URL $commandUrl) { $jsonParameters = [ 'id' => $this->extractId($id), @@ -42,10 +42,7 @@ private function extractId($id) return $id; } - /** - * @return bool - */ - private function isElement($id) + private function isElement($id): bool { return $id instanceof Element; } From d9c6506ffa70c278c474990c5cb8168de574b6f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Fri, 20 Mar 2020 22:20:35 +0100 Subject: [PATCH 29/37] Add type hints in Keys --- .../Extensions/Selenium2TestCase/SessionCommand/Keys.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Keys.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Keys.php index 30dd24fb..0591ca3d 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Keys.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Keys.php @@ -29,9 +29,6 @@ public function __construct($jsonParameters, URL $url) } } - /** - * @return string - */ public function httpMethod(): string { return 'POST'; @@ -40,13 +37,11 @@ public function httpMethod(): string /** * Given a string returns an array of the characters that compose the string * - * @param string $text - * - * @return array + * @param string|array $text * * @throws InvalidArgumentException */ - public function keysForText($text) + public function keysForText($text): array { if (is_scalar($text)) { return ['value' => preg_split('//u', (string) $text, -1, PREG_SPLIT_NO_EMPTY)]; From 6151246e1f0994eff557b4fb8b10c8531a00f9ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Fri, 20 Mar 2020 22:21:24 +0100 Subject: [PATCH 30/37] Add type hints in Location --- .../Extensions/Selenium2TestCase/SessionCommand/Location.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Location.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Location.php index 4284c2e3..5df1daf4 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Location.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Location.php @@ -15,7 +15,7 @@ */ class Location extends GenericAttribute { - public function __construct($location, $commandUrl) + public function __construct($location, URL $commandUrl) { if ($location !== null) { $jsonParameters = ['location' => $location]; From fd1398f94d61b86e372e09c2b3562fbb344178aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Fri, 20 Mar 2020 22:21:47 +0100 Subject: [PATCH 31/37] Add type hints in Log --- PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Log.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Log.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Log.php index 10e65c8b..8c5da29e 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Log.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Log.php @@ -17,7 +17,7 @@ */ class Log extends Command { - public function __construct($type, $commandUrl) + public function __construct($type, URL $commandUrl) { $jsonParameters = ['type' => $type]; parent::__construct($jsonParameters, $commandUrl); From d85cb32c260b788dc30d09eaba6faf8011ad0e6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Fri, 20 Mar 2020 22:22:16 +0100 Subject: [PATCH 32/37] Add type hints in MoveTo --- PHPUnit/Extensions/Selenium2TestCase/SessionCommand/MoveTo.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/MoveTo.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/MoveTo.php index 1c1e6c6b..21568653 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/MoveTo.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/MoveTo.php @@ -50,9 +50,6 @@ public function __construct($element, URL $url) parent::__construct($jsonParameters, $url); } - /** - * @return string - */ public function httpMethod(): string { return 'POST'; From aa4f8b183beb3d2866414fb5ff1df20fe499ef67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Fri, 20 Mar 2020 22:22:43 +0100 Subject: [PATCH 33/37] Add type hints in Orientation --- .../Extensions/Selenium2TestCase/SessionCommand/Orientation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Orientation.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Orientation.php index 7a99d38d..342180b5 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Orientation.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Orientation.php @@ -15,7 +15,7 @@ */ class Orientation extends GenericAttribute { - public function __construct($orientation, $commandUrl) + public function __construct($orientation, URL $commandUrl) { if ($orientation !== null) { $jsonParameters = ['orientation' => $orientation]; From 5bf5ce3cf3c61f9cdd9dba304506614e76e548b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Fri, 20 Mar 2020 22:23:16 +0100 Subject: [PATCH 34/37] Add type hints in Url --- PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Url.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Url.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Url.php index 09bb8cfb..d37e2601 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Url.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Url.php @@ -18,7 +18,7 @@ */ class Url extends Command { - public function __construct($url, $commandUrl, SeleniumURL $baseUrl) + public function __construct(?string $url, URL $commandUrl, SeleniumURL $baseUrl) { if ($url !== null) { $absoluteLocation = $baseUrl->jump($url)->getValue(); From aa3be7b05bb1b0e689dddf8b879e243093884bc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Fri, 20 Mar 2020 22:23:40 +0100 Subject: [PATCH 35/37] Add type hints in Window --- PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Window.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Window.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Window.php index 4936cb90..6c10de6b 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Window.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Window.php @@ -17,7 +17,7 @@ */ class Window extends Command { - public function __construct($name, $commandUrl) + public function __construct($name, URL $commandUrl) { $jsonParameters = ['name' => $name]; parent::__construct($jsonParameters, $commandUrl); From 395005fe32bbe53bb77e80e8b17c0236fcc91000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Sat, 21 Mar 2020 12:53:30 +0100 Subject: [PATCH 36/37] Fix type hints to pass tests --- PHPUnit/Extensions/Selenium2TestCase/CommandsHolder.php | 3 ++- .../Extensions/Selenium2TestCase/ElementCommand/Rect.php | 5 +++-- .../Extensions/Selenium2TestCase/SessionCommand/Frame.php | 1 + .../Selenium2TestCase/SessionCommand/Location.php | 2 ++ .../Extensions/Selenium2TestCase/SessionCommand/Log.php | 1 + .../Selenium2TestCase/SessionCommand/Orientation.php | 2 ++ .../Extensions/Selenium2TestCase/SessionCommand/Url.php | 2 +- .../Extensions/Selenium2TestCase/SessionCommand/Window.php | 1 + PHPUnit/Extensions/Selenium2TestCase/URL.php | 2 +- Tests/Selenium2TestCase/WaitUntilTest.php | 7 ------- 10 files changed, 14 insertions(+), 12 deletions(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase/CommandsHolder.php b/PHPUnit/Extensions/Selenium2TestCase/CommandsHolder.php index 6e0cd363..3c4d4344 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/CommandsHolder.php +++ b/PHPUnit/Extensions/Selenium2TestCase/CommandsHolder.php @@ -98,8 +98,9 @@ private function checkArguments(array $arguments): void /** * @param string $commandName The called method name defined as a key in initCommands() + * @param string|array|null $jsonParameters */ - protected function newCommand(string $commandName, array $jsonParameters): Command + protected function newCommand(string $commandName, $jsonParameters): Command { if (isset($this->commands[$commandName])) { $factoryMethod = $this->commands[$commandName]; diff --git a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Rect.php b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Rect.php index faa20ccb..bf53d448 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Rect.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Rect.php @@ -18,9 +18,10 @@ */ class Rect extends Command { - public function __construct(string $parameter, URL $attributeResourceBaseUrl) + /** @param null $parameter */ + public function __construct($parameter, URL $attributeResourceBaseUrl) { - parent::__construct([], $attributeResourceBaseUrl->descend($parameter)); + parent::__construct([], $attributeResourceBaseUrl); } public function httpMethod(): string diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Frame.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Frame.php index 447071da..00afd74e 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Frame.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Frame.php @@ -12,6 +12,7 @@ use PHPUnit\Extensions\Selenium2TestCase\Command; use PHPUnit\Extensions\Selenium2TestCase\Element; +use PHPUnit\Extensions\Selenium2TestCase\URL; /** * Changes the focus to a frame. diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Location.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Location.php index 5df1daf4..e5c20cf9 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Location.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Location.php @@ -10,6 +10,8 @@ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; +use PHPUnit\Extensions\Selenium2TestCase\URL; + /** * Gets or posts an attribute from/to the session (title, alert text, etc.) */ diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Log.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Log.php index 8c5da29e..8399b409 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Log.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Log.php @@ -11,6 +11,7 @@ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; use PHPUnit\Extensions\Selenium2TestCase\Command; +use PHPUnit\Extensions\Selenium2TestCase\URL; /** * Get the log for a given log type. Log buffer is reset after each request. diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Orientation.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Orientation.php index 342180b5..94d30ff5 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Orientation.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Orientation.php @@ -10,6 +10,8 @@ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; +use PHPUnit\Extensions\Selenium2TestCase\URL; + /** * Gets or posts an attribute from/to the session (title, alert text, etc.) */ diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Url.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Url.php index d37e2601..0f8020ef 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Url.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Url.php @@ -18,7 +18,7 @@ */ class Url extends Command { - public function __construct(?string $url, URL $commandUrl, SeleniumURL $baseUrl) + public function __construct(?string $url, SeleniumURL $commandUrl, SeleniumURL $baseUrl) { if ($url !== null) { $absoluteLocation = $baseUrl->jump($url)->getValue(); diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Window.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Window.php index 6c10de6b..1b50c283 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Window.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Window.php @@ -11,6 +11,7 @@ namespace PHPUnit\Extensions\Selenium2TestCase\SessionCommand; use PHPUnit\Extensions\Selenium2TestCase\Command; +use PHPUnit\Extensions\Selenium2TestCase\URL; /** * Changes the focus to a window. diff --git a/PHPUnit/Extensions/Selenium2TestCase/URL.php b/PHPUnit/Extensions/Selenium2TestCase/URL.php index f8e68027..405afc96 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/URL.php +++ b/PHPUnit/Extensions/Selenium2TestCase/URL.php @@ -44,7 +44,7 @@ public function __toString() return $this->getValue(); } - public function descend(string $addition): URL + public function descend(?string $addition): URL { if ($addition === '') { // if we're adding nothing, respect the current url's choice of diff --git a/Tests/Selenium2TestCase/WaitUntilTest.php b/Tests/Selenium2TestCase/WaitUntilTest.php index 617aa015..ee31746b 100644 --- a/Tests/Selenium2TestCase/WaitUntilTest.php +++ b/Tests/Selenium2TestCase/WaitUntilTest.php @@ -86,13 +86,6 @@ public function testWaitUnsuccessfully() }, 42); } - public function testInvalidCallback() - { - $this->expectException(\PHPUnit\Extensions\Selenium2TestCase\Exception::class); - $this->expectExceptionMessage('The valid callback is expected'); - $this->waitUntil('not a callback'); - } - public function testImplicitWaitIsRestoredAfterFailure() { $this->url('html/test_wait.html'); From 57355e788c0200301be1a3165cacc62f60087f4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C5=A0trba?= Date: Mon, 15 Jun 2020 16:22:04 +0200 Subject: [PATCH 37/37] Fix type hints to pass tests --- PHPUnit/Extensions/Selenium2TestCase/CommandsHolder.php | 2 +- .../Extensions/Selenium2TestCase/ScreenshotListener.php | 9 +++------ .../Extensions/Selenium2TestCase/SessionCommand/File.php | 1 - PHPUnit/Extensions/Selenium2TestCase/URL.php | 1 - 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/PHPUnit/Extensions/Selenium2TestCase/CommandsHolder.php b/PHPUnit/Extensions/Selenium2TestCase/CommandsHolder.php index 3c4d4344..99c6cd42 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/CommandsHolder.php +++ b/PHPUnit/Extensions/Selenium2TestCase/CommandsHolder.php @@ -97,7 +97,7 @@ private function checkArguments(array $arguments): void } /** - * @param string $commandName The called method name defined as a key in initCommands() + * @param string $commandName The called method name defined as a key in initCommands() * @param string|array|null $jsonParameters */ protected function newCommand(string $commandName, $jsonParameters): Command diff --git a/PHPUnit/Extensions/Selenium2TestCase/ScreenshotListener.php b/PHPUnit/Extensions/Selenium2TestCase/ScreenshotListener.php index 3fbfd268..56b37507 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/ScreenshotListener.php +++ b/PHPUnit/Extensions/Selenium2TestCase/ScreenshotListener.php @@ -43,18 +43,15 @@ public function addFailure(Test $test, AssertionFailedError $e, float $time): vo private function storeAScreenshot(Test $test): void { - if ($test instanceof Selenium2TestCase) - { + if ($test instanceof Selenium2TestCase) { $className = str_replace('\\', '_', get_class($test)); try { $file = $this->directory . '/' . $className . '__' . $test->getName() . '__' . date('Y-m-d\TH-i-s') . '.png'; - file_put_contents($file, $test->currentScreenshot()); + file_put_contents($file, $test->currentScreenshot()); } catch (\Exception $e) { $file = $this->directory . '/' . $className . '__' . $test->getName() . '__' . date('Y-m-d\TH-i-s') . '.txt'; - file_put_contents($file, "Screenshot generation doesn't work." . "\n" - . $e->getMessage() . "\n" - . $e->getTraceAsString()); + file_put_contents($file, sprintf("Screenshot generation doesn't work.\n%s\n%s", $e->getMessage(), $e->getTraceAsString())); } } } diff --git a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/File.php b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/File.php index 4b8b8127..3ea5132f 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/File.php +++ b/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/File.php @@ -40,7 +40,6 @@ public function __construct(string $argument, URL $url) $file = base64_encode($contents); - parent::__construct(['file' => $file], $url); unlink($zipfilePath); diff --git a/PHPUnit/Extensions/Selenium2TestCase/URL.php b/PHPUnit/Extensions/Selenium2TestCase/URL.php index 405afc96..768d822d 100644 --- a/PHPUnit/Extensions/Selenium2TestCase/URL.php +++ b/PHPUnit/Extensions/Selenium2TestCase/URL.php @@ -18,7 +18,6 @@ final class URL /** @var string */ private $value; - /** @param string $value */ public function __construct(string $value) { $this->value = $value;