protected function RendererTestBase::setUpRequest in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Render/RendererTestBase.php \Drupal\Tests\Core\Render\RendererTestBase::setUpRequest()
Sets up a request object on the request stack.
Parameters
string $method: The HTTP method to use for the request. Defaults to 'GET'.
16 calls to RendererTestBase::setUpRequest()
- RendererBubblingTest::testBubblingWithoutPreRender in core/
tests/ Drupal/ Tests/ Core/ Render/ RendererBubblingTest.php - Tests bubbling of assets when NOT using #pre_render callbacks.
- RendererBubblingTest::testBubblingWithPrerender in core/
tests/ Drupal/ Tests/ Core/ Render/ RendererBubblingTest.php - Tests bubbling of bubbleable metadata added by #pre_render callbacks.
- RendererBubblingTest::testConditionalCacheContextBubblingSelfHealing in core/
tests/ Drupal/ Tests/ Core/ Render/ RendererBubblingTest.php - Tests the self-healing of the redirect with conditional cache contexts.
- RendererBubblingTest::testContextBubblingCustomCacheBin in core/
tests/ Drupal/ Tests/ Core/ Render/ RendererBubblingTest.php - Tests cache context bubbling with a custom cache bin.
- RendererBubblingTest::testContextBubblingEdgeCases in core/
tests/ Drupal/ Tests/ Core/ Render/ RendererBubblingTest.php - Tests cache context bubbling in edge cases, because it affects the CID.
File
- core/
tests/ Drupal/ Tests/ Core/ Render/ RendererTestBase.php, line 226 - Contains \Drupal\Tests\Core\Render\RendererTestBase.
Class
- RendererTestBase
- Base class for the actual unit tests testing \Drupal\Core\Render\Renderer.
Namespace
Drupal\Tests\Core\RenderCode
protected function setUpRequest($method = 'GET') {
$request = Request::create('/', $method);
// Ensure that the request time is set as expected.
$request->server
->set('REQUEST_TIME', (int) $_SERVER['REQUEST_TIME']);
$this->requestStack
->push($request);
}