You are here

protected function CacheTest::userUpdatedTest in Apigee Edge 8

Tests developer cache invalidation after editing user.

1 call to CacheTest::userUpdatedTest()
CacheTest::testCache in tests/src/FunctionalJavascript/CacheTest.php
Tests cache of Apigee Edge entities.

File

tests/src/FunctionalJavascript/CacheTest.php, line 205

Class

CacheTest
Apigee Edge entity cache related tests.

Namespace

Drupal\Tests\apigee_edge\FunctionalJavascript

Code

protected function userUpdatedTest() {
  $this
    ->assertCacheInvalidation([
    "values:developer:{$this->developer->id()}",
    "values:developer_app:{$this->developerApp->id()}",
    "app_names:developer_app:{$this->developer->uuid()}:{$this->developerApp->getName()}",
  ], function () {
    $this
      ->drupalPostForm(Url::fromRoute('entity.user.edit_form', [
      'user' => $this->account
        ->id(),
    ]), [
      'first_name[0][value]' => $this
        ->randomMachineName(),
      'last_name[0][value]' => $this
        ->randomMachineName(),
    ], 'Save');
  });
}