public function ParagraphsProcessOnValueTest::setUp

Overrides ProcessTestCase::setUp

File

paragraphs/tests/src/Unit/migrate/ParagraphsProcessOnValueTest.php, line 29

Class

ParagraphsProcessOnValueTest
Test class for the paragraphs_process_on_value process plugin.

Namespace

Drupal\Tests\paragraphs\Unit\migrate

Code

public function setUp() : void {
  parent::setup();
  $configuration = [
    'source_value' => 'source',
    'expected_value' => 'expected',
    'process' => [
      'plugin' => 'get',
      'source' => 'theValue',
    ],
  ];
  $this->plugin = new ParagraphsProcessOnValue($configuration, 'paragraphs_process_on_value', [], $this->entityTypeBundleInfo);
  $this->row
    ->expects($this
    ->any())
    ->method('getSource')
    ->willReturn([
    'theValue' => 'Final Value',
    'source' => 'expected',
  ]);
}