You are here

private function DecoupledRouterFunctionalTest::getBasePath in Decoupled Router 8

Same name and namespace in other branches
  1. 2.x tests/src/Functional/DecoupledRouterFunctionalTest.php \Drupal\Tests\decoupled_router\Functional\DecoupledRouterFunctionalTest::getBasePath()

Computes the base path under which the Drupal managed URLs are available.

Return value

string The path.

2 calls to DecoupledRouterFunctionalTest::getBasePath()
DecoupledRouterFunctionalTest::testNegotiationNoMultilingual in tests/src/Functional/DecoupledRouterFunctionalTest.php
Tests reading multilingual content.
DecoupledRouterFunctionalTest::testUnpublishedContent in tests/src/Functional/DecoupledRouterFunctionalTest.php
Test that unpublished content ist not available

File

tests/src/Functional/DecoupledRouterFunctionalTest.php, line 305

Class

DecoupledRouterFunctionalTest
Test class.

Namespace

Drupal\Tests\decoupled_router\Functional

Code

private function getBasePath() {
  $parts = parse_url(getenv('SIMPLETEST_BASE_URL') ?: getenv('WEB_HOST') ?: DRUPAL_CI_BASE_URL);
  return empty($parts['path']) ? '/' : $parts['path'];
}