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 ef7e8d1 commit d2642e2
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 @@ -87,7 +87,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 @@ -44,7 +44,6 @@ public function testLoad(): void
);

$this->loadServiceMock
->expects(self::any())
->method('loadContent')
->with(self::identicalTo(52))
->willReturn($content);
Expand All @@ -55,7 +54,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 @@ -79,7 +77,6 @@ public function testLoadWithNonPublishedContent(): void
);

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

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

$this->loadServiceMock
->expects(self::any())
->method('loadContentByRemoteId')
->with(self::identicalTo('abc'))
->willReturn($content);
Expand All @@ -139,7 +134,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 @@ -163,7 +157,6 @@ public function testLoadByRemoteIdWithNonPublishedContent(): void
);

$this->loadServiceMock
->expects(self::any())
->method('loadContentByRemoteId')
->with(self::identicalTo('abc'))
->willReturn($content);
Expand All @@ -187,7 +180,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 @@ -41,7 +41,6 @@ public function testLoad(): void
);

$this->loadServiceMock
->expects(self::any())
->method('loadLocation')
->with(self::identicalTo(52))
->willReturn($location);
Expand All @@ -52,7 +51,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 @@ -73,7 +71,6 @@ public function testLoadWithNonPublishedContent(): void
);

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

$this->loadServiceMock
->expects(self::any())
->method('loadLocationByRemoteId')
->with(self::identicalTo('abc'))
->willReturn($location);
Expand All @@ -106,7 +102,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 @@ -127,7 +122,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 @@ -30,7 +30,6 @@ protected function setUp(): void
$this->loadServiceMock = $this->createMock(LoadService::class);

$this->repositoryMock
->expects(self::any())
->method('sudo')
->with(self::anything())
->willReturnCallback(
Expand All @@ -48,7 +47,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 @@ -59,7 +57,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 @@ -72,7 +69,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 @@ -29,7 +29,6 @@ protected function setUp(): void
$this->loadServiceMock = $this->createMock(LoadService::class);

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

$this->loadServiceMock
->expects(self::any())
->method('loadLocation')
->with(self::identicalTo(42))
->willReturn($location);
Expand All @@ -58,7 +56,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 d2642e2

Please sign in to comment.