Skip to content

Commit

Permalink
phpstan level 3 for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dbu committed Jan 3, 2025
1 parent fa7742a commit 2b8f87e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 1 addition & 2 deletions phpstan.tests.neon.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
parameters:
level: 2
level: 3
paths:
- tests

4 changes: 4 additions & 0 deletions tests/Unit/SymfonyCache/PurgeListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ public function testInvalidConfiguration(): void

private function getKernelMock(StoreInterface $store): MockInterface&CacheInvalidation
{
// https://github.com/phpstan/phpstan-mockery/issues/8
/** @phpstan-ignore-next-line */
return \Mockery::mock(CacheInvalidation::class)
->shouldReceive('getStore')
->once()
Expand All @@ -196,6 +198,8 @@ private function getKernelMock(StoreInterface $store): MockInterface&CacheInvali

private function getUnusedKernelMock(): CacheInvalidation&MockInterface
{
// https://github.com/phpstan/phpstan-mockery/issues/8
/** @phpstan-ignore-next-line */
return \Mockery::mock(CacheInvalidation::class)
->shouldNotReceive('getStore')
->getMock();
Expand Down
4 changes: 4 additions & 0 deletions tests/Unit/SymfonyCache/PurgeTagsListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ public function testInvalidConfiguration(): void

private function getKernelMock(StoreInterface $store): CacheInvalidation&MockInterface
{
// https://github.com/phpstan/phpstan-mockery/issues/8
/** @phpstan-ignore-next-line */
return \Mockery::mock(CacheInvalidation::class)
->shouldReceive('getStore')
->once()
Expand All @@ -189,6 +191,8 @@ private function getKernelMock(StoreInterface $store): CacheInvalidation&MockInt

private function getUnusedKernelMock(): CacheInvalidation&MockInterface
{
// https://github.com/phpstan/phpstan-mockery/issues/8
/** @phpstan-ignore-next-line */
return \Mockery::mock(CacheInvalidation::class)
->shouldNotReceive('getStore')
->getMock();
Expand Down

0 comments on commit 2b8f87e

Please sign in to comment.