protected function InsertResponsiveImageTestBase::setUp in Insert 8.2
@inheritdoc
Overrides InsertFileTestBase::setUp
File
- modules/
insert_responsive_image/ tests/ src/ FunctionalJavaScript/ InsertResponsiveImageTestBase.php, line 28
Class
Namespace
Drupal\Tests\insert_responsive_image\FunctionalJavascriptCode
protected function setUp() {
parent::setUp();
// Install the 'wide' responsive image style.
foreach ([
'2600x2600',
'1300x1300',
'650x650',
'325x325',
] as $size) {
$imageStyle = Yaml::decode(file_get_contents(DRUPAL_ROOT . '/core/profiles/standard/config/optional/image.style.max_' . $size . '.yml'));
$this
->config('image.style.max_' . $size)
->setData($imageStyle)
->save(TRUE);
}
$wideImageStyle = Yaml::decode(file_get_contents(DRUPAL_ROOT . '/core/profiles/standard/config/optional/responsive_image.styles.wide.yml'));
$this
->config('responsive_image.styles.wide')
->setData($wideImageStyle)
->save(TRUE);
}