public function ConfigEntityStorageTest::testSaveInvalid in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php \Drupal\Tests\Core\Config\Entity\ConfigEntityStorageTest::testSaveInvalid()
@covers ::save
File
- core/
tests/ Drupal/ Tests/ Core/ Config/ Entity/ ConfigEntityStorageTest.php, line 408
Class
- ConfigEntityStorageTest
- @coversDefaultClass \Drupal\Core\Config\Entity\ConfigEntityStorage @group Config
Namespace
Drupal\Tests\Core\Config\EntityCode
public function testSaveInvalid() {
$this->cacheTagsInvalidator
->invalidateTags(Argument::cetera())
->shouldNotBeCalled();
$entity = $this
->getMockEntity();
$this
->expectException(EntityMalformedException::class);
$this
->expectExceptionMessage('The entity does not have an ID.');
$this->entityStorage
->save($entity);
}