diff --git a/core/tests/Drupal/KernelTests/Core/Image/ToolkitTest.php b/core/tests/Drupal/KernelTests/Core/Image/ToolkitTest.php index c33e835d5b..4b3523c1da 100644 --- a/core/tests/Drupal/KernelTests/Core/Image/ToolkitTest.php +++ b/core/tests/Drupal/KernelTests/Core/Image/ToolkitTest.php @@ -83,7 +83,7 @@ public function testApply() { $calls = $this->imageTestGetAllCalls(); $this->assertEquals('my_operation', $calls['apply'][0][0]); $this->assertEquals(1, $calls['apply'][0][1]['p1']); - $this->assertTrue(TRUE, $calls['apply'][0][1]['p2']); + $this->assertTrue($calls['apply'][0][1]['p2']); $this->assertEquals('text', $calls['apply'][0][1]['p3']); } diff --git a/core/tests/Drupal/Tests/Traits/Core/Image/ToolkitTestTrait.php b/core/tests/Drupal/Tests/Traits/Core/Image/ToolkitTestTrait.php index 38adfc8f11..b5dc101bc1 100644 --- a/core/tests/Drupal/Tests/Traits/Core/Image/ToolkitTestTrait.php +++ b/core/tests/Drupal/Tests/Traits/Core/Image/ToolkitTestTrait.php @@ -2,6 +2,7 @@ namespace Drupal\Tests\Traits\Core\Image; +use Drupal\Core\Image\ImageInterface; use Drupal\Tests\TestFileCreationTrait; /** @@ -78,7 +79,7 @@ protected function imageTestGetAllCalls(): array { * @return \Drupal\Core\Image\ImageInterface * The image object. */ - protected function getImage(): \Drupal\Core\Image\ImageInterface { + protected function getImage(): ImageInterface { $image_factory = \Drupal::service('image.factory'); $file = current($this->drupalGetTestFiles('image')); $image = $image_factory->get($file->uri, 'test');