You are here

public function EntityReferenceDependencyManagerTest::testHasDependents in Entity Reference Integrity 8

Test the reference check method.

@covers ::hasDependents

File

tests/src/Kernel/EntityReferenceDependencyManagerTest.php, line 88

Class

EntityReferenceDependencyManagerTest
Test the EntityReferenceDependencyManager.

Namespace

Drupal\Tests\entity_reference_integrity\Kernel

Code

public function testHasDependents() {
  $this
    ->assertFalse($this->dependencyManager
    ->hasDependents($this->testUser));
  $this
    ->setUserAsNodeAuthor();
  $this
    ->assertTrue($this->dependencyManager
    ->hasDependents($this->testUser));
}