From af7c6887a13b7fbd32cda393af1ee115c1aaadc6 Mon Sep 17 00:00:00 2001 From: Project Update Bot <git@users.noreply.drupalcode.org> Date: Tue, 17 Jan 2023 10:57:20 +0000 Subject: [PATCH] Issue #3287995 by Project Update Bot, e.bogatyrev: Automated Drupal 10 compatibility fixes --- imageapi_optimize_binaries.info.yml | 3 +-- tests/src/Unit/BinaryTestCase.php | 8 ++------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/imageapi_optimize_binaries.info.yml b/imageapi_optimize_binaries.info.yml index b87e270..5ab3c55 100644 --- a/imageapi_optimize_binaries.info.yml +++ b/imageapi_optimize_binaries.info.yml @@ -2,7 +2,6 @@ name: Image Optimize - Binaries type: module package: Image Optimize description: 'Provide image optimization plugins that use locally installed binaries.' -core: 8.x -core_version_requirement: ^8 || ^9 +core_version_requirement: ^8 || ^9 || ^10 dependencies: - imageapi_optimize:imageapi_optimize diff --git a/tests/src/Unit/BinaryTestCase.php b/tests/src/Unit/BinaryTestCase.php index cfdc2b6..4d113b4 100644 --- a/tests/src/Unit/BinaryTestCase.php +++ b/tests/src/Unit/BinaryTestCase.php @@ -17,9 +17,7 @@ abstract class BinaryTestCase extends UnitTestCase { protected function getImageFactoryMock() { - return $this->getMockBuilder('\Drupal\Core\Image\ImageFactory') - ->disableOriginalConstructor() - ->getMock(); + return $this->createMock('\Drupal\Core\Image\ImageFactory'); } protected function getFileSystemMock() { @@ -30,9 +28,7 @@ abstract class BinaryTestCase extends UnitTestCase { } protected function getShellOperationsMock() { - $shellOperationsMock = $this->getMockBuilder('\Drupal\imageapi_optimize_binaries\ImageAPIOptimizeShellOperationsInterface') - ->setMethods(['findExecutablePath', 'execShellCommand', 'saveCommandStdoutToFile']) - ->getMock(); + $shellOperationsMock = $this->createMock('\Drupal\imageapi_optimize_binaries\ImageAPIOptimizeShellOperationsInterface'); $shellOperationsMock ->method('findExecutablePath')->will($this->returnArgument(0)); -- GitLab