protected function OffCanvasTestBase::drupalGet in Drupal 8
Same name and namespace in other branches
- 9 core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php \Drupal\Tests\system\FunctionalJavascript\OffCanvasTestBase::drupalGet()
- 10 core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php \Drupal\Tests\system\FunctionalJavascript\OffCanvasTestBase::drupalGet()
Retrieves a Drupal path or an absolute path.
Parameters
string|\Drupal\Core\Url $path: Drupal path or URL to load into Mink controlled browser.
array $options: (optional) Options to be forwarded to the url generator.
string[] $headers: An array containing additional HTTP request headers, the array keys are the header names and the array values the header values. This is useful to set for example the "Accept-Language" header for requesting the page in a different language. Note that not all headers are supported, for example the "Accept" header is always overridden by the browser. For testing REST APIs it is recommended to obtain a separate HTTP client using getHttpClient() and performing requests that way.
Return value
string The retrieved HTML string, also available as $this->getRawContent()
Overrides UiHelperTrait::drupalGet
See also
\Drupal\Tests\BrowserTestBase::getHttpClient()
12 calls to OffCanvasTestBase::drupalGet()
- ConfigAccessTest::testBlockConfigAccess in core/
modules/ settings_tray/ tests/ src/ FunctionalJavascript/ ConfigAccessTest.php - Tests access to block forms with related configuration is correct.
- OffCanvasTest::testNarrowWidth in core/
modules/ system/ tests/ src/ FunctionalJavascript/ OffCanvasTest.php - Tests the body displacement behaves differently at a narrow width.
- OffCanvasTest::testOffCanvasLinks in core/
modules/ system/ tests/ src/ FunctionalJavascript/ OffCanvasTest.php - Tests that non-contextual links will work with the off-canvas dialog.
- OverriddenConfigurationTest::testOverriddenBlock in core/
modules/ settings_tray/ tests/ src/ FunctionalJavascript/ OverriddenConfigurationTest.php - Tests that blocks with configuration overrides are disabled.
- OverriddenConfigurationTest::testOverriddenConfigurationRemoved in core/
modules/ settings_tray/ tests/ src/ FunctionalJavascript/ OverriddenConfigurationTest.php - Test blocks with overridden related configuration removed when overridden.
File
- core/
modules/ system/ tests/ src/ FunctionalJavascript/ OffCanvasTestBase.php, line 15
Class
- OffCanvasTestBase
- Base class contains common test functionality for the Off-canvas dialog.
Namespace
Drupal\Tests\system\FunctionalJavascriptCode
protected function drupalGet($path, array $options = [], array $headers = []) {
$return = parent::drupalGet($path, $options, $headers);
$this
->assertPageLoadComplete();
return $return;
}