diff --git a/core/lib/Drupal/Core/Entity/ContentEntityBase.php b/core/lib/Drupal/Core/Entity/ContentEntityBase.php index 381ac6a..aae2896 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityBase.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityBase.php @@ -349,7 +349,7 @@ public function isTranslatable() { * {@inheritdoc} */ public function preSave(EntityStorageInterface $storage) { - // An entity requiring validation should be saved if it has not been + // An entity requiring validation should not be saved if it has not been // actually validated. if ($this->validationRequired && !$this->validated) { // @todo Make this an assertion in https://www.drupal.org/node/2408013. diff --git a/core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php b/core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php index 3a3c4aa..f00ecfa 100644 --- a/core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php @@ -376,7 +376,7 @@ public function testRequiredValidation() { ->method('getValidator') ->will($this->returnValue($validator)); - /** @var \PHPUnit_Framework_MockObject_MockObject|\Drupal\Core\Entity\EntityStorageInterface $storage */ + /** @var \Drupal\Core\Entity\EntityStorageInterface|\PHPUnit_Framework_MockObject_MockObject $storage */ $storage = $this->getMock('\Drupal\Core\Entity\EntityStorageInterface'); $storage->expects($this->any()) ->method('save') @@ -403,7 +403,7 @@ public function testRequiredValidation() { // Check that the "validated" status is reset after saving the entity and // that trying to save a non-validated entity when validation is required - // result in an exception. + // results in an exception. $this->assertTrue($this->entity->isValidationRequired()); $this->entity->save(); }