Use ::class notation where possible

This commit is contained in:
Yassine Guedidi
2022-09-01 20:54:56 +02:00
parent d1d56fbe25
commit 98af2e25f2
52 changed files with 347 additions and 250 deletions

View File

@ -8,8 +8,10 @@ use PHPUnit\Framework\TestCase;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\AuthenticationEvents;
use Symfony\Component\Security\Core\Event\AuthenticationFailureEvent;
use Symfony\Component\Security\Core\Exception\AuthenticationException;
use Wallabag\UserBundle\EventListener\AuthenticationFailureListener;
class AuthenticationFailureListenerTest extends TestCase
@ -41,11 +43,11 @@ class AuthenticationFailureListenerTest extends TestCase
public function testOnAuthenticationFailure()
{
$token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')
$token = $this->getMockBuilder(TokenInterface::class)
->disableOriginalConstructor()
->getMock();
$exception = $this->getMockBuilder('Symfony\Component\Security\Core\Exception\AuthenticationException')
$exception = $this->getMockBuilder(AuthenticationException::class)
->disableOriginalConstructor()
->getMock();

View File

@ -2,6 +2,7 @@
namespace Tests\Wallabag\UserBundle\EventListener;
use Doctrine\ORM\EntityManager;
use FOS\UserBundle\Event\FilterUserResponseEvent;
use FOS\UserBundle\FOSUserEvents;
use PHPUnit\Framework\TestCase;
@ -25,7 +26,7 @@ class CreateConfigListenerTest extends TestCase
protected function setUp(): void
{
$session = new Session(new MockArraySessionStorage());
$this->em = $this->getMockBuilder('Doctrine\ORM\EntityManager')
$this->em = $this->getMockBuilder(EntityManager::class)
->disableOriginalConstructor()
->getMock();