diff --git a/PHPUnit/Extensions/Selenium2TestCase.php b/PHPUnit/Extensions/Selenium2TestCase.php index bb95b25b..613c45e4 100644 --- a/PHPUnit/Extensions/Selenium2TestCase.php +++ b/PHPUnit/Extensions/Selenium2TestCase.php @@ -60,9 +60,9 @@ 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 PHPUnit\Util\InvalidArgumentHelper; use RuntimeException; use Throwable; @@ -445,12 +445,12 @@ public function __call($command, $arguments) /** * @param string $host - * @throws InvalidArgumentException + * @throws PHPUnitInvalidArgumentException */ public function setHost($host) { if (!is_string($host)) { - throw InvalidArgumentHelper::factory(1, 'string'); + throw PHPUnitInvalidArgumentException::create(1, 'string'); } $this->parameters['host'] = $host; @@ -463,12 +463,12 @@ public function getHost() /** * @param integer $port - * @throws InvalidArgumentException + * @throws PHPUnitInvalidArgumentException */ public function setPort($port) { if (!is_int($port)) { - throw InvalidArgumentHelper::factory(1, 'integer'); + throw PHPUnitInvalidArgumentException::create(1, 'integer'); } $this->parameters['port'] = $port; @@ -481,12 +481,12 @@ public function getPort() /** * @param boolean $secure - * @throws InvalidArgumentException + * @throws PHPUnitInvalidArgumentException */ public function setSecure($secure) { if(!is_bool($secure)) { - throw InvalidArgumentHelper::factory(1, 'boolean'); + throw PHPUnitInvalidArgumentException::create(1, 'boolean'); } $this->parameters['secure'] = $secure; @@ -499,12 +499,12 @@ public function getSecure() /** * @param string $browser - * @throws InvalidArgumentException + * @throws PHPUnitInvalidArgumentException */ public function setBrowser($browserName) { if (!is_string($browserName)) { - throw InvalidArgumentHelper::factory(1, 'string'); + throw PHPUnitInvalidArgumentException::create(1, 'string'); } $this->parameters['browserName'] = $browserName; @@ -517,12 +517,12 @@ public function getBrowser() /** * @param string $browserUrl - * @throws InvalidArgumentException + * @throws PHPUnitInvalidArgumentException */ public function setBrowserUrl($browserUrl) { if (!is_string($browserUrl)) { - throw InvalidArgumentHelper::factory(1, 'string'); + throw PHPUnitInvalidArgumentException::create(1, 'string'); } $this->parameters['browserUrl'] = new URL($browserUrl);