protected function JqueryUiLibraryAssetsTest::trimFilePath in Drupal 9
Removes base_url() and query args from file paths.
Parameters
string $path: The path being trimmed.
Return value
string The trimmed path.
2 calls to JqueryUiLibraryAssetsTest::trimFilePath()
- JqueryUiLibraryAssetsTest::testAssetLoadingUnchanged in core/
tests/ Drupal/ FunctionalTests/ Libraries/ JqueryUiLibraryAssetsTest.php - Confirms jQuery UI assets load as expected.
- JqueryUiLibraryAssetsTest::testLibraryAssetLoadingOrder in core/
tests/ Drupal/ FunctionalTests/ Libraries/ JqueryUiLibraryAssetsTest.php - Confirms that jQuery UI assets load on the page in the configured order.
File
- core/
tests/ Drupal/ FunctionalTests/ Libraries/ JqueryUiLibraryAssetsTest.php, line 213
Class
- JqueryUiLibraryAssetsTest
- Tests the loading of jQuery UI CSS and JS assets.
Namespace
Drupal\FunctionalTests\LibrariesCode
protected function trimFilePath($path) {
$base_path_position = strpos($path, base_path());
if ($base_path_position !== FALSE) {
$path = substr_replace($path, '', $base_path_position, strlen(base_path()));
}
$query_pos = strpos($path, '?');
return $query_pos !== FALSE ? substr($path, 0, $query_pos) : $path;
}