public function ImportEntityManagerTest::testEntityPresaveNodeIsDuringSync in Acquia Content Hub 8
Tests the entityPresave() method, node is during sync.
@covers ::entityPresave
File
- tests/src/ Unit/ ImportEntityManagerTest.php, line 234 
Class
- ImportEntityManagerTest
- PHPUnit test for the ImportEntityManager class.
Namespace
Drupal\Tests\acquia_contenthub\UnitCode
public function testEntityPresaveNodeIsDuringSync() {
  $original_node = $this
    ->createMock('\\Drupal\\node\\NodeInterface');
  $node = $this
    ->createMock('\\Drupal\\node\\NodeInterface');
  $node->original = $original_node;
  $node->__contenthub_entity_syncing = TRUE;
  $this->contentHubEntitiesTracking
    ->expects($this
    ->never())
    ->method('loadImportedByDrupalEntity');
  $this->importEntityManager
    ->entityPresave($node);
}