Commit 090ae73c authored by catch's avatar catch

Issue #2471593 by JeroenT, Devaraj johnson: Replace the use of...

Issue #2471593 by JeroenT, Devaraj johnson: Replace the use of entity_load_unchanged() in ImageAdminStylesTest
parent 1909ebd7
......@@ -244,7 +244,8 @@ function testStyle() {
$this->assertNoLinkByHref($style_path . '/effects/' . $uuids['image_crop'] . '/delete');
// Refresh the image style information and verify that the effect was
// actually deleted.
$style = entity_load_unchanged('image_style', $style->id());
$entity_type_manager = $this->container->get('entity_type.manager');
$style = $entity_type_manager->getStorage('image_style')->loadUnchanged($style->id());
$this->assertFalse($style->getEffects()->has($uuids['image_crop']), format_string(
'Effect with ID %uuid no longer found on image style %style',
array(
......@@ -260,7 +261,8 @@ function testStyle() {
);
$this->drupalPostForm($style_path, array('new' => 'image_rotate'), t('Add'));
$this->drupalPostForm(NULL, $edit, t('Add effect'));
$style = entity_load_unchanged('image_style', $style_name);
$entity_type_manager = $this->container->get('entity_type.manager');
$style = $entity_type_manager->getStorage('image_style')->loadUnchanged($style_name);
$this->assertEqual(count($style->getEffects()), 6, 'Rotate effect with transparent background was added.');
// Style deletion form.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment