You are here

protected function RESTTestBase::rebuildCache in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/rest/src/Tests/RESTTestBase.php \Drupal\rest\Tests\RESTTestBase::rebuildCache()

Rebuilds routing caches.

3 calls to RESTTestBase::rebuildCache()
ResourceTest::testAuthentication in core/modules/rest/src/Tests/ResourceTest.php
Tests that a resource without authentication cannot be enabled.
ResourceTest::testFormats in core/modules/rest/src/Tests/ResourceTest.php
Tests that a resource without formats cannot be enabled.
RESTTestBase::enableService in core/modules/rest/src/Tests/RESTTestBase.php
Enables the REST service interface for a specific entity type.

File

core/modules/rest/src/Tests/RESTTestBase.php, line 274
Contains \Drupal\rest\Tests\RESTTestBase.

Class

RESTTestBase
Test helper class that provides a REST client method to send HTTP requests.

Namespace

Drupal\rest\Tests

Code

protected function rebuildCache() {

  // Rebuild routing cache, so that the REST API paths are available.
  $this->container
    ->get('router.builder')
    ->rebuild();
}