You are here

public function EnforcedIntegrityTest::testNodeIntegrity in Entity Reference Integrity 8

Test a typical content entity.

File

modules/entity_reference_integrity_enforce/tests/src/Functional/EnforcedIntegrityTest.php, line 48

Class

EnforcedIntegrityTest
Test enforcing referential integrity.

Namespace

Drupal\Tests\entity_reference_integrity_enforce\Functional

Code

public function testNodeIntegrity() {
  $node = $this
    ->createNode([
    'title' => 'foo',
  ]);
  $this
    ->assertEntityDeleteProtected($node, 'Cannot delete "node" of type "page" with label "foo" and ID "1" because other content is referencing it and the integrity of this entity type is enforced.');
}