Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix moved InvalidArgumentHelper #445

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions PHPUnit/Extensions/Selenium2TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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);
Expand Down