src/Concerns/MakesUrlAssertions.php
public function assertPortIs($port)
    {
        $pattern = str_replace('\*', '.*', preg_quote($port, '/'));

        $actual = parse_url($this->driver->getCurrentURL(), PHP_URL_PORT) ?? '';

        PHPUnit::assertRegExp(
            '/^'.$pattern.'$/u', $actual,
            "Actual port [{$actual}] does not equal expected port [{$pattern}]."
        );

        return $this;
    }
public function assertPortIs($port)
    {
        $pattern = str_replace('\*', '.*', preg_quote($port, '/'));

        $actual = parse_url($this->driver->getCurrentURL(), PHP_URL_PORT) ?? '';

        PHPUnit::assertRegExp(
            '/^'.$pattern.'$/u', $actual,
            "Actual port [{$actual}] does not equal expected port [{$pattern}]."
        );

        return $this;
    }
public function assertPortIs ( $ port ) { $ pattern = str_replace ( '\*' , '.*' , preg_quote ( $ port , '/' ) ) ; $ actual = parse_url ( $ this -> driver -> getCurrentURL ( ) , PHP_URL_PORT ) ?? '' ; PHPUnit :: assertRegExp ( '/^' . $ pattern . '$/u' , $ actual , "Actual port [{$actual}] does not equal expected port [{$pattern}]." ) ; return $ this ; }
Assert that the current port matches the given port.

@param  string  $port
@return $this
Assert that the current port matches the given port .