$this->assertEqual($default_constraints + $extra_constraints, $entity_type->getConstraints());
// Test altering constraints.
$this->assertEqual($default_constraints + $extra_constraints, $entity_type->getConstraints());
// Test altering constraints.
$this->state->set('entity_test_constraints.alter', $altered_constraints);
// Clear the cache in state instance in the Drupal container, so it can pick
// up the modified value.
$this->state->set('entity_test_constraints.alter', $altered_constraints);
// Clear the cache in state instance in the Drupal container, so it can pick
// up the modified value.