public function ImportEntityManagerTest::testEntityUpdateNodeIsPendingSync in Acquia Content Hub 8
Tests the entityUpdate() method, node is pending sync.
@covers ::entityUpdate
File
- tests/
src/ Unit/ ImportEntityManagerTest.php, line 163
Class
- ImportEntityManagerTest
- PHPUnit test for the ImportEntityManager class.
Namespace
Drupal\Tests\acquia_contenthub\UnitCode
public function testEntityUpdateNodeIsPendingSync() {
$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($this->contentHubEntitiesTracking);
$this->contentHubEntitiesTracking
->expects($this
->once())
->method('isPendingSync')
->willReturn(FALSE);
$this->contentHubEntitiesTracking
->expects($this
->never())
->method('getUuid');
$this->importEntityManager
->entityUpdate($node);
}