diff --git a/core/modules/views/tests/src/Kernel/ViewsIntegrationTest.php b/core/modules/views/tests/src/Kernel/ViewsIntegrationTest.php index df2697c..9f98ba2 100644 --- a/core/modules/views/tests/src/Kernel/ViewsIntegrationTest.php +++ b/core/modules/views/tests/src/Kernel/ViewsIntegrationTest.php @@ -34,7 +34,8 @@ class ViewsIntegrationTest extends ViewsKernelTestBase { */ public function testImage() { /** @var \Drupal\image\ImageStyleInterface $style */ - ImageStyle::create(['name' => 'foo'])->save(); + $style = ImageStyle::create(['name' => 'foo']); + $style->save(); // Create a new image field 'bar' to be used in 'entity_test_fields' view. FieldStorageConfig::create([ @@ -71,7 +72,7 @@ public function testImage() { $this->assertTrue(in_array('image.style.foo', $dependencies['config'])); // Delete the 'foo' image style. - ImageStyle::load('foo')->delete(); + $style->delete(); // Checks that the view has been deleted too. $this->assertNull(View::load('entity_test_fields'));