protected function WebTestExtended::checkEntityValue in Scheduled Updates 8
Check an entity value after reload.
Parameters
$entity_type_id:
\Drupal\Core\Entity\ContentEntityInterface $entity:
$field:
$value:
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
\Drupal\Component\Plugin\Exception\PluginNotFoundException
2 calls to WebTestExtended::checkEntityValue()
- EmbeddedScheduledUpdateTypeTestBase::checkRunningPromoteUpdates in tests/
src/ FunctionalJavascript/ EmbeddedScheduledUpdateTypeTestBase.php - Checking adding and running updates for title.
- IndependentScheduledUpdateTypeTest::checkRunningPromoteUpdates in tests/
src/ FunctionalJavascript/ IndependentScheduledUpdateTypeTest.php - Checking adding and running updates.
File
- tests/
src/ FunctionalJavascript/ WebTestExtended.php, line 81 - Contains \Drupal\Tests\scheduled_updates\WebTestExtended.
Class
- WebTestExtended
- BrowserTestBase plus project agnostic helper functions.
Namespace
Drupal\Tests\scheduled_updates\FunctionalJavascriptCode
protected function checkEntityValue($entity_type_id, ContentEntityInterface $entity, $field, $value) {
$storage = \Drupal::entityTypeManager()
->getStorage($entity_type_id);
$storage
->resetCache([
$entity
->id(),
]);
$updated_entity = $storage
->load($entity
->id());
$this
->assertEqual($updated_entity
->get($field)->value, 1, $entity
->label() . " {$field} = {$value}");
}