function WebAssert::cleanUrl
Trims scriptname from the URL.
Parameters
string $url:
Return value
string
3 calls to WebAssert::cleanUrl()
- WebAssert::addressEquals in vendor/
behat/ mink/ src/ WebAssert.php - Checks that current session address is equals to provided one.
- WebAssert::addressNotEquals in vendor/
behat/ mink/ src/ WebAssert.php - Checks that current session address is not equals to provided one.
- WebAssert::getCurrentUrlPath in vendor/
behat/ mink/ src/ WebAssert.php - Gets current url of the page.
File
-
vendor/
behat/ mink/ src/ WebAssert.php, line 863
Class
- WebAssert
- Mink web assertions tool.
Namespace
Behat\MinkCode
protected function cleanUrl(string $url) {
$parts = parse_url($url);
$fragment = empty($parts['fragment']) ? '' : '#' . $parts['fragment'];
$path = empty($parts['path']) ? '/' : $parts['path'];
return preg_replace('/^\\/[^\\.\\/]+\\.php\\//', '/', $path) . $fragment;
}