Skip to content

Commit

Permalink
Remove usage of self::any
Browse files Browse the repository at this point in the history
  • Loading branch information
emodric committed Jun 5, 2023
1 parent 7da9679 commit 17ca023
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 22 deletions.
1 change: 0 additions & 1 deletion tests/bundle/DependencyInjection/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ protected function getConfiguration(): ConfigurationInterface
{
$extensionMock = $this->createMock(ExtensionInterface::class);
$extensionMock
->expects(self::any())
->method('getAlias')
->willReturn('alias');

Expand Down
8 changes: 0 additions & 8 deletions tests/lib/Item/ValueLoader/ContentValueLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public function testLoad(): void
);

$this->loadServiceMock
->expects(self::any())
->method('loadContent')
->with(self::identicalTo(52))
->willReturn($content);
Expand All @@ -60,7 +59,6 @@ public function testLoad(): void
public function testLoadWithNoContent(): void
{
$this->loadServiceMock
->expects(self::any())
->method('loadContent')
->with(self::identicalTo(52))
->willThrowException(new Exception());
Expand All @@ -87,7 +85,6 @@ public function testLoadWithNonPublishedContent(): void
);

$this->loadServiceMock
->expects(self::any())
->method('loadContent')
->with(self::identicalTo(52))
->willReturn($content);
Expand All @@ -114,7 +111,6 @@ public function testLoadWithNoMainLocation(): void
);

$this->loadServiceMock
->expects(self::any())
->method('loadContent')
->with(self::identicalTo(52))
->willReturn($content);
Expand Down Expand Up @@ -142,7 +138,6 @@ public function testLoadByRemoteId(): void
);

$this->loadServiceMock
->expects(self::any())
->method('loadContentByRemoteId')
->with(self::identicalTo('abc'))
->willReturn($content);
Expand All @@ -156,7 +151,6 @@ public function testLoadByRemoteId(): void
public function testLoadByRemoteIdWithNoContent(): void
{
$this->loadServiceMock
->expects(self::any())
->method('loadContentByRemoteId')
->with(self::identicalTo('abc'))
->willThrowException(new Exception());
Expand All @@ -183,7 +177,6 @@ public function testLoadByRemoteIdWithNonPublishedContent(): void
);

$this->loadServiceMock
->expects(self::any())
->method('loadContentByRemoteId')
->with(self::identicalTo('abc'))
->willReturn($content);
Expand All @@ -210,7 +203,6 @@ public function testLoadByRemoteIdWithNoMainLocation(): void
);

$this->loadServiceMock
->expects(self::any())
->method('loadContentByRemoteId')
->with(self::identicalTo('abc'))
->willReturn($content);
Expand Down
6 changes: 0 additions & 6 deletions tests/lib/Item/ValueLoader/LocationValueLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public function testLoad(): void
);

$this->loadServiceMock
->expects(self::any())
->method('loadLocation')
->with(self::identicalTo(52))
->willReturn($location);
Expand All @@ -57,7 +56,6 @@ public function testLoad(): void
public function testLoadWithNoLocation(): void
{
$this->loadServiceMock
->expects(self::any())
->method('loadLocation')
->with(self::identicalTo(52))
->willThrowException(new Exception());
Expand All @@ -81,7 +79,6 @@ public function testLoadWithNonPublishedContent(): void
);

$this->loadServiceMock
->expects(self::any())
->method('loadLocation')
->with(self::identicalTo(52))
->willReturn($location);
Expand All @@ -106,7 +103,6 @@ public function testLoadByRemoteId(): void
);

$this->loadServiceMock
->expects(self::any())
->method('loadLocationByRemoteId')
->with(self::identicalTo('abc'))
->willReturn($location);
Expand All @@ -120,7 +116,6 @@ public function testLoadByRemoteId(): void
public function testLoadByRemoteIdWithNoLocation(): void
{
$this->loadServiceMock
->expects(self::any())
->method('loadLocationByRemoteId')
->with(self::identicalTo('abc'))
->willThrowException(new Exception());
Expand All @@ -144,7 +139,6 @@ public function testLoadByRemoteIdWithNonPublishedContent(): void
);

$this->loadServiceMock
->expects(self::any())
->method('loadLocationByRemoteId')
->with(self::identicalTo('abc'))
->willReturn($location);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ protected function setUp(): void
$this->loadServiceMock = $this->createMock(LoadService::class);

$this->repositoryMock
->expects(self::any())
->method('sudo')
->with(self::anything())
->willReturnCallback(
Expand All @@ -50,7 +49,6 @@ public function testGetValueObject(): void
$content = new Content(['contentInfo' => new ContentInfo(['mainLocationId' => 24])]);

$this->loadServiceMock
->expects(self::any())
->method('loadContent')
->with(self::identicalTo(42))
->willReturn($content);
Expand All @@ -64,7 +62,6 @@ public function testGetValueObject(): void
public function testGetValueObjectWithNonExistentLocation(): void
{
$this->loadServiceMock
->expects(self::any())
->method('loadContent')
->with(self::identicalTo(42))
->willThrowException(new NotFoundException('content', 42));
Expand All @@ -80,7 +77,6 @@ public function testGetValueObjectWithNoMainLocation(): void
$content = new Content(['contentInfo' => new ContentInfo(['mainLocationId' => null])]);

$this->loadServiceMock
->expects(self::any())
->method('loadContent')
->with(self::identicalTo(42))
->willReturn($content);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ protected function setUp(): void
$this->loadServiceMock = $this->createMock(LoadService::class);

$this->repositoryMock
->expects(self::any())
->method('sudo')
->with(self::anything())
->willReturnCallback(
Expand All @@ -49,7 +48,6 @@ public function testGetValueObject(): void
$location = new Location();

$this->loadServiceMock
->expects(self::any())
->method('loadLocation')
->with(self::identicalTo(42))
->willReturn($location);
Expand All @@ -63,7 +61,6 @@ public function testGetValueObject(): void
public function testGetValueObjectWithNonExistentLocation(): void
{
$this->loadServiceMock
->expects(self::any())
->method('loadLocation')
->with(self::identicalTo(42))
->willThrowException(new NotFoundException('location', 42));
Expand Down

0 comments on commit 17ca023

Please sign in to comment.