protected function UITestBase::drupalGet in Drupal 10
Same name and namespace in other branches
- 8 core/modules/views_ui/tests/src/Functional/UITestBase.php \Drupal\Tests\views_ui\Functional\UITestBase::drupalGet()
- 9 core/modules/views_ui/tests/src/Functional/UITestBase.php \Drupal\Tests\views_ui\Functional\UITestBase::drupalGet()
6 calls to UITestBase::drupalGet()
- ContentTranslationViewsUITest::testViewsUI in core/modules/content_translation/tests/src/Functional/Views/ContentTranslationViewsUITest.php
- Tests the views UI.
- TaxonomyIndexTidUiTest::testExposedFilter in core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php
- Tests exposed taxonomy filters.
- TaxonomyIndexTidUiTest::testExposedGroupedFilter in core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php
- Tests exposed grouped taxonomy filters.
- TaxonomyIndexTidUiTest::testExposedUnpublishedFilterOptions in core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php
- Tests that an exposed taxonomy filter doesn't show unpublished terms.
- TaxonomyIndexTidUiTest::testFilterUI in core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php
- Tests the filter UI.
... See full list
File
- core/modules/views_ui/tests/src/Functional/UITestBase.php, line 76
Class
- UITestBase
- Provides a base class for testing the Views UI.
Namespace
Drupal\Tests\views_ui\Functional
Code
protected function drupalGet($path, array $options = [], array $headers = []) {
$url = $this
->buildUrl($path, $options);
if (strpos($url, '/nojs/') !== FALSE) {
$url = preg_replace('|/nojs/|', '/ajax/', $url, 1);
$result = $this
->drupalGet($url, $options);
$this
->assertSession()
->statusCodeEquals(200);
$this
->assertSession()
->responseHeaderEquals('Content-Type', 'application/json');
$this
->assertNotEmpty(json_decode($result), 'Ensure that the AJAX request returned valid content.');
}
return parent::drupalGet($path, $options, $headers);
}