From 78ba9b8995b9dbd31761eb0d1ca16e2cd4aca18a Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Fri, 11 Feb 2022 14:13:08 +0100 Subject: [PATCH] return values from the aws client are not used --- Tests/Fixtures/Model.php | 19 ----------------- .../Cache/Resolver/AwsS3ResolverTest.php | 21 ++++--------------- 2 files changed, 4 insertions(+), 36 deletions(-) delete mode 100644 Tests/Fixtures/Model.php diff --git a/Tests/Fixtures/Model.php b/Tests/Fixtures/Model.php deleted file mode 100644 index 030ef94d1..000000000 --- a/Tests/Fixtures/Model.php +++ /dev/null @@ -1,19 +0,0 @@ -getS3ClientMock(); $s3 ->expects($this->once()) - ->method('putObject') - ->willReturn($this->getS3ResponseMock()); + ->method('putObject'); $resolver = new AwsS3Resolver($s3, 'images.example.com'); $resolver->store($binary, 'thumb/foobar.jpg', 'thumb'); @@ -176,8 +174,7 @@ public function testRemoveCacheForPathAndFilterOnRemove(): void ->with([ 'Bucket' => 'images.example.com', 'Key' => 'thumb/some-folder/path.jpg', - ]) - ->willReturn($this->getS3ResponseMock()); + ]); $resolver = new AwsS3Resolver($s3, 'images.example.com'); $resolver->remove(['some-folder/path.jpg'], ['thumb']); @@ -205,8 +202,7 @@ public function testRemoveCacheForSomePathsAndFilterOnRemove(): void 'Bucket' => 'images.example.com', 'Key' => 'thumb/pathTwo.jpg', ] - ) - ->willReturn($this->getS3ResponseMock()); + ); $resolver = new AwsS3Resolver($s3, 'images.example.com'); $resolver->remove( @@ -247,8 +243,7 @@ public function testRemoveCacheForSomePathsAndSomeFiltersOnRemove(): void 'Bucket' => 'images.example.com', 'Key' => 'filterTwo/pathTwo.jpg', ] - ) - ->willReturn($this->getS3ResponseMock()); + ); $resolver = new AwsS3Resolver($s3, 'images.example.com'); $resolver->remove( @@ -348,14 +343,6 @@ public function testCatchAndLogExceptionForFilterOnRemove(): void $resolver->remove([], [$expectedFilter]); } - /** - * @return MockObject|Model - */ - protected function getS3ResponseMock() - { - return $this->createObjectMock(Model::class); - } - /** * @return MockObject|\Aws\S3\S3Client */