function MenuLinkParentTest::testTransformException
Same name in other branches
- 9 core/modules/migrate/tests/src/Unit/process/MenuLinkParentTest.php \Drupal\Tests\migrate\Unit\process\MenuLinkParentTest::testTransformException()
- 10 core/modules/migrate/tests/src/Unit/process/MenuLinkParentTest.php \Drupal\Tests\migrate\Unit\process\MenuLinkParentTest::testTransformException()
- 11.x core/modules/migrate/tests/src/Unit/process/MenuLinkParentTest.php \Drupal\Tests\migrate\Unit\process\MenuLinkParentTest::testTransformException()
@covers ::transform
File
-
core/
modules/ migrate/ tests/ src/ Unit/ process/ MenuLinkParentTest.php, line 71
Class
- MenuLinkParentTest
- Tests the menu link parent process plugin.
Namespace
Drupal\Tests\migrate\Unit\processCode
public function testTransformException() {
$plugin = new MenuLinkParent([], 'map', [], $this->migrateLookup
->reveal(), $this->menuLinkManager
->reveal(), $this->menuLinkStorage
->reveal(), $this->migration
->reveal());
$this->expectException(MigrateSkipRowException::class);
$this->expectExceptionMessage("No parent link found for plid '1' in menu 'admin'.");
$plugin->transform([
1,
'admin',
NULL,
], $this->migrateExecutable, $this->row, 'destination_property');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.