// List cache tag.
$this->entityTypeId . '_list',
// Own cache tag.
$this->entityTypeId . ':' .
$this->values
['id'
],
],
]);
// This method is internal, so check for errors on calling it only.
$storage =
$this->
createMock('\Drupal\Core\Entity\EntityStorageInterface'
);
// A creation should trigger the invalidation of the "list" cache tag.
$this->entity->
postSave($storage, FALSE
);
// An update should trigger the invalidation of both the "list" and the
// "own" cache tags.
$this->entity->
postSave($storage, TRUE
);
} /**
* @covers ::postSave
*/
public function testPostSaveBundle() { $this->cacheTagsInvalidator->
expects($this->
exactly(2
)) ->
method('invalidateTags'
)