You are here

public function ParagraphsProcessOnValueTest::setUp in Paragraphs 8

Overrides ProcessTestCase::setUp

File

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',
  ]);
}