public function AspectSwitcherTest::testAspectSwitcherFailureOnLandscapeCircularReference in Image Effects 8.2
Same name and namespace in other branches
- 8.3 tests/src/Functional/Effect/AspectSwitcherTest.php \Drupal\Tests\image_effects\Functional\Effect\AspectSwitcherTest::testAspectSwitcherFailureOnLandscapeCircularReference()
- 8 tests/src/Functional/Effect/AspectSwitcherTest.php \Drupal\Tests\image_effects\Functional\Effect\AspectSwitcherTest::testAspectSwitcherFailureOnLandscapeCircularReference()
Image style save should fail if AspectSwitcher effect has circular ref.
File
- tests/
src/ Functional/ Effect/ AspectSwitcherTest.php, line 209
Class
- AspectSwitcherTest
- AspectSwitcher effect test.
Namespace
Drupal\Tests\image_effects\Functional\EffectCode
public function testAspectSwitcherFailureOnLandscapeCircularReference() {
$effect = [
'id' => 'image_effects_aspect_switcher',
'data' => [
'landscape_image_style' => $this->testImageStyleName,
'portrait_image_style' => 'portrait_image_style_test',
'ratio_adjustment' => 1,
],
];
$this->testImageStyle
->addImageEffect($effect);
$this
->setExpectedException(ConfigValueException::class, "You can not select the Image Effects Test image style itself for the landscape style");
$this->testImageStyle
->save();
}