diff --git a/src/Concerns/MakesAssertions.php b/src/Concerns/MakesAssertions.php index 1085fa399..aab1b556c 100644 --- a/src/Concerns/MakesAssertions.php +++ b/src/Concerns/MakesAssertions.php @@ -51,6 +51,21 @@ public function assertPathIs($path) return $this; } + /** + * Assert that the current URL path does not match the given path. + * + * @param string $path + * @return $this + */ + public function assertPathIsNot($path) + { + PHPUnit::assertNotEquals($path, parse_url( + $this->driver->getCurrentURL() + )['path']); + + return $this; + } + /** * Assert that the current URL path matches the given route. *