function FileCopyTest::assertPlugin
Same name in other branches
- 9 core/modules/migrate/tests/src/Unit/process/FileCopyTest.php \Drupal\Tests\migrate\Unit\process\FileCopyTest::assertPlugin()
- 10 core/modules/migrate/tests/src/Unit/process/FileCopyTest.php \Drupal\Tests\migrate\Unit\process\FileCopyTest::assertPlugin()
- 11.x core/modules/migrate/tests/src/Unit/process/FileCopyTest.php \Drupal\Tests\migrate\Unit\process\FileCopyTest::assertPlugin()
Creates a TestFileCopy process plugin.
Parameters
array $configuration: The plugin configuration.
$expected: The expected value of the plugin configuration.
3 calls to FileCopyTest::assertPlugin()
- FileCopyTest::testDeprecationNoticeRename in core/
modules/ migrate/ tests/ src/ Unit/ process/ FileCopyTest.php - Tests that the rename configuration key will trigger a deprecation notice.
- FileCopyTest::testDeprecationNoticeReuse in core/
modules/ migrate/ tests/ src/ Unit/ process/ FileCopyTest.php - Tests that the reuse configuration key will trigger a deprecation notice.
- FileCopyTest::testFileProcessBaseConstructor in core/
modules/ migrate/ tests/ src/ Unit/ process/ FileCopyTest.php - Tests that the plugin constructor correctly sets the configuration.
File
-
core/
modules/ migrate/ tests/ src/ Unit/ process/ FileCopyTest.php, line 107
Class
- FileCopyTest
- Tests the file copy process plugin.
Namespace
Drupal\Tests\migrate\Unit\processCode
protected function assertPlugin($configuration, $expected) {
$stream_wrapper_manager = $this->prophesize(StreamWrapperManagerInterface::class)
->reveal();
$file_system = $this->prophesize(FileSystemInterface::class)
->reveal();
$download_plugin = $this->prophesize(MigrateProcessInterface::class)
->reveal();
$this->plugin = new TestFileCopy($configuration, 'test', [], $stream_wrapper_manager, $file_system, $download_plugin);
$plugin_config = $this->plugin
->getConfiguration();
$this->assertArrayHasKey('file_exists', $plugin_config);
$this->assertSame($expected, $plugin_config['file_exists']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.