You are here

protected function WebAssert::cleanUrl in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/behat/mink/src/WebAssert.php \Behat\Mink\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 747

Class

WebAssert
Mink web assertions tool.

Namespace

Behat\Mink

Code

protected function cleanUrl($url) {
  $parts = parse_url($url);
  $fragment = empty($parts['fragment']) ? '' : '#' . $parts['fragment'];
  $path = empty($parts['path']) ? '/' : $parts['path'];
  return preg_replace('/^\\/[^\\.\\/]+\\.php\\//', '/', $path) . $fragment;
}