public function LingotekDashboardTest::testDashboardEndpointUrlIsRelative in Lingotek Translation 3.6.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/LingotekDashboardTest.php \Drupal\Tests\lingotek\Functional\LingotekDashboardTest::testDashboardEndpointUrlIsRelative()
- 4.0.x tests/src/Functional/LingotekDashboardTest.php \Drupal\Tests\lingotek\Functional\LingotekDashboardTest::testDashboardEndpointUrlIsRelative()
- 3.0.x tests/src/Functional/LingotekDashboardTest.php \Drupal\Tests\lingotek\Functional\LingotekDashboardTest::testDashboardEndpointUrlIsRelative()
- 3.1.x tests/src/Functional/LingotekDashboardTest.php \Drupal\Tests\lingotek\Functional\LingotekDashboardTest::testDashboardEndpointUrlIsRelative()
- 3.2.x tests/src/Functional/LingotekDashboardTest.php \Drupal\Tests\lingotek\Functional\LingotekDashboardTest::testDashboardEndpointUrlIsRelative()
- 3.3.x tests/src/Functional/LingotekDashboardTest.php \Drupal\Tests\lingotek\Functional\LingotekDashboardTest::testDashboardEndpointUrlIsRelative()
- 3.4.x tests/src/Functional/LingotekDashboardTest.php \Drupal\Tests\lingotek\Functional\LingotekDashboardTest::testDashboardEndpointUrlIsRelative()
- 3.5.x tests/src/Functional/LingotekDashboardTest.php \Drupal\Tests\lingotek\Functional\LingotekDashboardTest::testDashboardEndpointUrlIsRelative()
- 3.7.x tests/src/Functional/LingotekDashboardTest.php \Drupal\Tests\lingotek\Functional\LingotekDashboardTest::testDashboardEndpointUrlIsRelative()
- 3.8.x tests/src/Functional/LingotekDashboardTest.php \Drupal\Tests\lingotek\Functional\LingotekDashboardTest::testDashboardEndpointUrlIsRelative()
Ensure endpoint url is relative.
File
- tests/
src/ Functional/ LingotekDashboardTest.php, line 613
Class
- LingotekDashboardTest
- Tests the Lingotek dashboard.
Namespace
Drupal\Tests\lingotek\FunctionalCode
public function testDashboardEndpointUrlIsRelative() {
$basepath = \Drupal::request()
->getBasePath();
$this
->drupalGet('/admin/lingotek');
$drupalSettings = $this
->getDrupalSettings();
// Using an absolute url can be problematic in https environments, ensure we
// use a relative one.
$this
->assertEquals($basepath . '/admin/lingotek/dashboard_endpoint', $drupalSettings['lingotek']['cms_data']['endpoint_url']);
}