forked from wallabag/wallabag
Use ::class notation where possible
This commit is contained in:
@ -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();
|
||||
|
||||
|
||||
@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user