chore: upgrade phpunit to 12.5
This commit is contained in:
1 parent
da039d0527
commit
849da8d471
53 files changed
+832
-856
No files matched your search
@@ -6,7 +6,7 @@ namespace App\Tests\Security\Voter;
|
||||
|
||||
use App\Entity\User;
|
||||
use App\Security\Voter\UserVoter;
|
||||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
use PHPUnit\Framework\MockObject\Stub;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
|
||||
@@ -14,11 +14,11 @@ use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
|
||||
|
||||
class UserVoterTest extends TestCase
|
||||
{
|
||||
private Security&MockObject $security;
|
||||
private Security&Stub $security;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
$this->security = $this->createMock(Security::class);
|
||||
$this->security = $this->createStub(Security::class);
|
||||
}
|
||||
|
||||
public function testSuperAdminMayEditOtherUsers(): void
|
||||
@@ -59,10 +59,9 @@ class UserVoterTest extends TestCase
|
||||
{
|
||||
$this->security
|
||||
->method('isGranted')
|
||||
->with('IS_IMPERSONATOR')
|
||||
->willReturn($isImpersonator);
|
||||
->willReturnCallback(static fn (mixed $attribute): bool => 'IS_IMPERSONATOR' === $attribute && $isImpersonator);
|
||||
|
||||
$token = $this->createMock(TokenInterface::class);
|
||||
$token = $this->createStub(TokenInterface::class);
|
||||
$token
|
||||
->method('getUser')
|
||||
->willReturn($currentUser);
|
||||
|
||||
Reference in new issue
Block a user