public function FocalPointEffectsTest::testEffectConstructor in Focal Point 8
Test the construct method.
@covers ::__construct
File
- tests/
src/ Unit/ Effects/ FocalPointEffectsTest.php, line 35
Class
- FocalPointEffectsTest
- Tests the Focal Point image effects.
Namespace
Drupal\Tests\focal_point\Unit\EffectsCode
public function testEffectConstructor() {
// We can't use $this->getTestEffect here because the attributes tested
// below won't match.
$logger = $this
->prophesize(LoggerInterface::class);
$crop_storage = $this
->prophesize(CropStorageInterface::class);
$focal_point_config = $this
->prophesize(ImmutableConfig::class);
$request = $this
->prophesize(Request::class);
$effect = new FocalPointCropImageEffect([], 'plugin_id', [], $logger
->reveal(), $this->focalPointManager, $crop_storage
->reveal(), $focal_point_config
->reveal(), $request
->reveal());
$this
->assertEquals($focal_point_config
->reveal(), $effect
->getFocalPointConfig());
$this
->assertEquals($crop_storage
->reveal(), $effect
->getCropStorage());
}