diff --git a/core/lib/Drupal/Core/Image/ImageInterface.php b/core/lib/Drupal/Core/Image/ImageInterface.php index ddcd452..d0e0286 100644 --- a/core/lib/Drupal/Core/Image/ImageInterface.php +++ b/core/lib/Drupal/Core/Image/ImageInterface.php @@ -130,7 +130,7 @@ public function save($destination = NULL); * @return bool * TRUE on success, FALSE on failure. */ - public function createNew($width, $height, $mime_type = 'png', $transparent_color = '#ffffff'); + public function createNew($width, $height, $extension = 'png', $transparent_color = '#ffffff'); /** * Scales an image while maintaining aspect ratio. diff --git a/core/modules/system/src/Tests/Image/ToolkitGdTest.php b/core/modules/system/src/Tests/Image/ToolkitGdTest.php index 898e56b..0d87bb4 100644 --- a/core/modules/system/src/Tests/Image/ToolkitGdTest.php +++ b/core/modules/system/src/Tests/Image/ToolkitGdTest.php @@ -299,7 +299,7 @@ function testManipulations() { foreach ($values['corners'] as $key => $corner) { // The test gif that does not have transparency has yellow where the // others have transparent. - if ($file === 'image-test-no-transparency.gif' && $corner === $this->transparent && $op !== 'create_new') { + if ($file === 'image-test-no-transparency.gif' && $corner === $this->transparent) { $corner = $this->yellow; } // Get the location of the corner. @@ -330,7 +330,6 @@ function testManipulations() { // Check that saved image reloads without raising PHP errors. $image_reloaded = $this->imageFactory->get($file_path); $resource = $image_reloaded->getToolkit()->getResource(); - } } @@ -372,7 +371,6 @@ function testManipulations() { $this->assertFalse($image->isValid(), 'CreateNew with invalid color hex string fails.'); $image->createNew(50, 20, 'gif', '#ff0000'); $this->assertTrue($image->isValid(), 'CreateNew with valid arguments validates the Image.'); - } /**