function ArrayBuildTest::testNonExistentValue
Tests non-existent key for the value configuration.
File
- 
              core/
modules/ migrate/ tests/ src/ Unit/ process/ ArrayBuildTest.php, line 59  
Class
- ArrayBuildTest
 - @coversDefaultClass \Drupal\migrate\Plugin\migrate\process\ArrayBuild[[api-linebreak]] @group migrate
 
Namespace
Drupal\Tests\migrate\Unit\processCode
public function testNonExistentValue() : void {
  $source = [
    [
      'foo' => 'bar',
    ],
  ];
  $this->expectException(MigrateException::class);
  $this->expectExceptionMessage("The key 'bar' does not exist");
  $this->plugin
    ->transform($source, $this->migrateExecutable, $this->row, 'destination_property');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.