You are here

public function ImportEntityManagerTest::testEntityUpdateNodeNotImported in Acquia Content Hub 8

Tests the entityUpdate() method, node is not imported.

@covers ::entityUpdate

File

tests/src/Unit/ImportEntityManagerTest.php, line 142

Class

ImportEntityManagerTest
PHPUnit test for the ImportEntityManager class.

Namespace

Drupal\Tests\acquia_contenthub\Unit

Code

public function testEntityUpdateNodeNotImported() {
  $node = $this
    ->createMock('\\Drupal\\node\\NodeInterface');
  $node
    ->expects($this
    ->once())
    ->method('getEntityTypeId')
    ->willReturn('node');
  $node
    ->expects($this
    ->once())
    ->method('id')
    ->willReturn(12);
  $this->contentHubEntitiesTracking
    ->expects($this
    ->once())
    ->method('loadImportedByDrupalEntity')
    ->with('node', 12)
    ->willReturn(NULL);
  $this->importEntityManager
    ->entityUpdate($node);
}