protected function DemoImageTest::createPlugin in Panopoly 8.2
Creates a new plugin to test.
Parameters
array $configuration: The plugin configuration.
array|null $methods: The list of methods to mock.
Return value
\Drupal\panopoly_core\Plugin\migrate\process\DemoImage|\PHPUnit_Framework_MockObject_MockObject A mock plugin to test.
4 calls to DemoImageTest::createPlugin()
- DemoImageTest::testGetOptionalProperty in modules/
panopoly/ panopoly_core/ tests/ src/ Unit/ Plugin/ migrate/ process/ DemoImageTest.php - Tests the getOptionalProperty() method.
- DemoImageTest::testTransformBadConfiguration in modules/
panopoly/ panopoly_core/ tests/ src/ Unit/ Plugin/ migrate/ process/ DemoImageTest.php - Tests calling transform() with bad configuration.
- DemoImageTest::testTransformBadSourceFile in modules/
panopoly/ panopoly_core/ tests/ src/ Unit/ Plugin/ migrate/ process/ DemoImageTest.php - Tests that transform() throws an exception when a file is inaccessible.
- DemoImageTest::testTransformSuccess in modules/
panopoly/ panopoly_core/ tests/ src/ Unit/ Plugin/ migrate/ process/ DemoImageTest.php - Tests a successful call to transform().
File
- modules/
panopoly/ panopoly_core/ tests/ src/ Unit/ Plugin/ migrate/ process/ DemoImageTest.php, line 89
Class
- DemoImageTest
- Tests for the 'panopoly_demo_image' migrate process plugin.
Namespace
Drupal\Tests\panopoly_core\Unit\Plugin\migrate\processCode
protected function createPlugin(array $configuration, array $methods = NULL) {
return $this
->getMockBuilder(DemoImage::class)
->setConstructorArgs([
$configuration,
'demo_image',
[],
$this->migration
->reveal(),
$this->fileStorage
->reveal(),
$this->moduleHandler
->reveal(),
$this->filesystem
->reveal(),
$this->imageFactory
->reveal(),
])
->onlyMethods($methods)
->getMock();
}