Skip to content

Commit bbec12e

Browse files
Update Web.php: Added hints that seeCurrentUrlEquals etc. are only looking at the path (#18)
Page: https://codeception.com/docs/modules/WebDriver#seeCurrentUrlEquals At least this is true for WebDriver. In fact, the best solution would be to rename those functions to `seeCurentPathEquals`, but that would be a BC break.
1 parent 2cb54e6 commit bbec12e

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/Lib/Interfaces/Web.php

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -345,30 +345,28 @@ public function dontSeeLink(string $text, string $url = ''): void;
345345
public function seeInCurrentUrl(string $uri): void;
346346

347347
/**
348-
* Checks that the current URL is equal to the given string.
349-
* Unlike `seeInCurrentUrl`, this only matches the full URL.
348+
* Checks that the current URL (path) is equal to the given string.
350349
*
351350
* ```php
352351
* <?php
353-
* // to match root url
352+
* // to match the home page
354353
* $I->seeCurrentUrlEquals('/');
355354
* ```
356355
*/
357356
public function seeCurrentUrlEquals(string $uri): void;
358357

359358
/**
360-
* Checks that the current URL matches the given regular expression.
359+
* Checks that the current URL (path) matches the given regular expression.
361360
*
362361
* ```php
363362
* <?php
364-
* // to match root url
365-
* $I->seeCurrentUrlMatches('~^/users/(\d+)~');
363+
* $I->seeCurrentUrlMatches('~^/users/\d+$~');
366364
* ```
367365
*/
368366
public function seeCurrentUrlMatches(string $uri): void;
369367

370368
/**
371-
* Checks that the current URI doesn't contain the given string.
369+
* Checks that the current URI (path) doesn't contain the given string.
372370
*
373371
* ```php
374372
* <?php
@@ -378,7 +376,7 @@ public function seeCurrentUrlMatches(string $uri): void;
378376
public function dontSeeInCurrentUrl(string $uri): void;
379377

380378
/**
381-
* Checks that the current URL doesn't equal the given string.
379+
* Checks that the current URL (path) doesn't equal the given string.
382380
* Unlike `dontSeeInCurrentUrl`, this only matches the full URL.
383381
*
384382
* ```php
@@ -390,12 +388,12 @@ public function dontSeeInCurrentUrl(string $uri): void;
390388
public function dontSeeCurrentUrlEquals(string $uri): void;
391389

392390
/**
393-
* Checks that current url doesn't match the given regular expression.
391+
* Checks that current URL (path) doesn't match the given regular expression.
394392
*
395393
* ```php
396394
* <?php
397395
* // to match root url
398-
* $I->dontSeeCurrentUrlMatches('~^/users/(\d+)~');
396+
* $I->dontSeeCurrentUrlMatches('~^/users/\d+$~');
399397
* ```
400398
*/
401399
public function dontSeeCurrentUrlMatches(string $uri): void;

0 commit comments

Comments
 (0)