You are here

public function SetNullTest::testTransform in Workbench Moderation to Content Moderation 8.2

@covers ::transform

File

tests/src/Unit/Plugin/migrate/process/SetNullTest.php, line 19

Class

SetNullTest
@coversDefaultClass \Drupal\wbm2cm\Plugin\migrate\process\SetNull @group wbm2cm

Namespace

Drupal\Tests\wbm2cm\Unit\Plugin\migrate\process

Code

public function testTransform() {
  $plugin = new SetNull([], 'unset', []);
  $executable = $this
    ->prophesize(MigrateExecutableInterface::class)
    ->reveal();
  $row = $this
    ->prophesize(Row::class);
  $row
    ->setDestinationProperty('moderation_state', NULL)
    ->shouldBeCalled();
  $plugin
    ->transform(NULL, $executable, $row
    ->reveal(), 'moderation_state');
}