Commit 4db570e0 authored by catch's avatar catch

Issue #2641610 by Mac_Weber: Replace deprecated usage of ...

Issue #2641610 by Mac_Weber: Replace deprecated usage of  entity_create('responsive_image_style') with a direct call to  ResponsiveImageStyle::create()
parent 3e4c90d3
......@@ -13,6 +13,7 @@
use Drupal\node\Entity\Node;
use Drupal\file\Entity\File;
use Drupal\responsive_image\Plugin\Field\FieldFormatter\ResponsiveImageFormatter;
use Drupal\responsive_image\Entity\ResponsiveImageStyle;
use Drupal\user\RoleInterface;
/**
......@@ -60,7 +61,7 @@ protected function setUp() {
));
$this->drupalLogin($this->adminUser);
// Add responsive image style.
$this->responsiveImgStyle = entity_create('responsive_image_style', array(
$this->responsiveImgStyle = ResponsiveImageStyle::create(array(
'id' => 'style_one',
'label' => 'Style One',
'breakpoint_group' => 'responsive_image_test_module',
......
......@@ -10,6 +10,7 @@
use Drupal\field_ui\Tests\FieldUiTestTrait;
use Drupal\simpletest\WebTestBase;
use Drupal\responsive_image\Entity\ResponsiveImageStyle;
/**
* Tests the "Responsive Image" formatter settings form.
......@@ -65,7 +66,7 @@ function testResponsiveImageFormatterUI() {
$this->assertText("Select a responsive image style.", 'The expected summary is displayed.');
// Create responsive image styles.
$responsive_image_style = entity_create('responsive_image_style', array(
$responsive_image_style = ResponsiveImageStyle::create(array(
'id' => 'style_one',
'label' => 'Style One',
'breakpoint_group' => 'responsive_image_test_module',
......
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