Skip to content

Commit f579e32

Browse files
committed
Fix namespace
1 parent 2a238c0 commit f579e32

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

PHPUnit/Extensions/Selenium2TestCase.php

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
namespace PHPUnit\Extensions;
4646

4747
use Exception;
48+
use InvalidArgumentException;
4849
use PHPUnit\Extensions\Selenium2TestCase\Element;
4950
use PHPUnit\Extensions\Selenium2TestCase\Element\Select;
5051
use PHPUnit\Extensions\Selenium2TestCase\ElementCriteria;
@@ -59,7 +60,7 @@
5960
use PHPUnit\Extensions\Selenium2TestCase\WaitUntil;
6061
use PHPUnit\Extensions\Selenium2TestCase\Window;
6162
use PHPUnit\Extensions\SeleniumCommon\RemoteCoverage;
62-
use PHPUnit\Framework\InvalidArgumentException;
63+
use PHPUnit\Framework\InvalidArgumentException as PHPUnitInvalidArgumentException;
6364
use PHPUnit\Framework\TestCase;
6465
use PHPUnit\Framework\TestResult;
6566
use RuntimeException;
@@ -198,7 +199,7 @@ abstract class Selenium2TestCase extends TestCase
198199
public static function shareSession($shareSession)
199200
{
200201
if (!is_bool($shareSession)) {
201-
throw new \InvalidArgumentException("The shared session support can only be switched on or off.");
202+
throw new InvalidArgumentException("The shared session support can only be switched on or off.");
202203
}
203204
if (!$shareSession) {
204205
self::$sessionStrategy = self::defaultSessionStrategy();
@@ -212,7 +213,7 @@ public static function shareSession($shareSession)
212213
public static function keepSessionOnFailure($keepSession)
213214
{
214215
if (!is_bool($keepSession)) {
215-
throw new \InvalidArgumentException("The keep session on fail support can only be switched on or off.");
216+
throw new InvalidArgumentException("The keep session on fail support can only be switched on or off.");
216217
}
217218
if ($keepSession){
218219
self::$keepSessionOnFailure = TRUE;
@@ -311,7 +312,7 @@ protected function setUpSessionStrategy($params)
311312
} elseif (isset($params['sessionStrategy'])) {
312313
$strat = $params['sessionStrategy'];
313314
if ($strat != "isolated" && $strat != "shared") {
314-
throw new \InvalidArgumentException("Session strategy must be either 'isolated' or 'shared'");
315+
throw new InvalidArgumentException("Session strategy must be either 'isolated' or 'shared'");
315316
} elseif ($strat == "isolated") {
316317
self::$browserSessionStrategy = new Isolated;
317318
} else {
@@ -444,12 +445,12 @@ public function __call($command, $arguments)
444445

445446
/**
446447
* @param string $host
447-
* @throws InvalidArgumentException
448+
* @throws PHPUnitInvalidArgumentException
448449
*/
449450
public function setHost($host)
450451
{
451452
if (!is_string($host)) {
452-
throw InvalidArgumentException::create(1, 'string');
453+
throw PHPUnitInvalidArgumentException::create(1, 'string');
453454
}
454455

455456
$this->parameters['host'] = $host;
@@ -462,12 +463,12 @@ public function getHost()
462463

463464
/**
464465
* @param integer $port
465-
* @throws InvalidArgumentException
466+
* @throws PHPUnitInvalidArgumentException
466467
*/
467468
public function setPort($port)
468469
{
469470
if (!is_int($port)) {
470-
throw InvalidArgumentException::create(1, 'integer');
471+
throw PHPUnitInvalidArgumentException::create(1, 'integer');
471472
}
472473

473474
$this->parameters['port'] = $port;
@@ -480,12 +481,12 @@ public function getPort()
480481

481482
/**
482483
* @param boolean $secure
483-
* @throws InvalidArgumentException
484+
* @throws PHPUnitInvalidArgumentException
484485
*/
485486
public function setSecure($secure)
486487
{
487488
if(!is_bool($secure)) {
488-
throw InvalidArgumentException::create(1, 'boolean');
489+
throw PHPUnitInvalidArgumentException::create(1, 'boolean');
489490
}
490491

491492
$this->parameters['secure'] = $secure;
@@ -498,12 +499,12 @@ public function getSecure()
498499

499500
/**
500501
* @param string $browser
501-
* @throws InvalidArgumentException
502+
* @throws PHPUnitInvalidArgumentException
502503
*/
503504
public function setBrowser($browserName)
504505
{
505506
if (!is_string($browserName)) {
506-
throw InvalidArgumentException::create(1, 'string');
507+
throw PHPUnitInvalidArgumentException::create(1, 'string');
507508
}
508509

509510
$this->parameters['browserName'] = $browserName;
@@ -516,12 +517,12 @@ public function getBrowser()
516517

517518
/**
518519
* @param string $browserUrl
519-
* @throws InvalidArgumentException
520+
* @throws PHPUnitInvalidArgumentException
520521
*/
521522
public function setBrowserUrl($browserUrl)
522523
{
523524
if (!is_string($browserUrl)) {
524-
throw InvalidArgumentException::create(1, 'string');
525+
throw PHPUnitInvalidArgumentException::create(1, 'string');
525526
}
526527

527528
$this->parameters['browserUrl'] = new URL($browserUrl);

0 commit comments

Comments
 (0)