Skip to content

Commit a05751e

Browse files
committed
Remove use of ForwardCompatTrait
1 parent 67c8a1e commit a05751e

20 files changed

+9
-69
lines changed

Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,21 @@
1212
namespace Symfony\Component\Security\Http\Tests\Authentication;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\HttpFoundation\Response;
1716
use Symfony\Component\HttpKernel\HttpKernelInterface;
1817
use Symfony\Component\Security\Core\Security;
1918
use Symfony\Component\Security\Http\Authentication\DefaultAuthenticationFailureHandler;
2019

2120
class DefaultAuthenticationFailureHandlerTest extends TestCase
2221
{
23-
use ForwardCompatTestTrait;
24-
2522
private $httpKernel;
2623
private $httpUtils;
2724
private $logger;
2825
private $request;
2926
private $session;
3027
private $exception;
3128

32-
private function doSetUp()
29+
protected function setUp()
3330
{
3431
$this->httpKernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock();
3532
$this->httpUtils = $this->getMockBuilder('Symfony\Component\Security\Http\HttpUtils')->getMock();

Tests/Authentication/SimpleAuthenticationHandlerTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\Security\Http\Tests;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\HttpFoundation\Response;
1716
use Symfony\Component\Security\Core\Authentication\SimpleAuthenticatorInterface;
1817
use Symfony\Component\Security\Core\Exception\AuthenticationException;
@@ -22,8 +21,6 @@
2221

2322
class SimpleAuthenticationHandlerTest extends TestCase
2423
{
25-
use ForwardCompatTestTrait;
26-
2724
private $successHandler;
2825

2926
private $failureHandler;
@@ -36,7 +33,7 @@ class SimpleAuthenticationHandlerTest extends TestCase
3633

3734
private $response;
3835

39-
private function doSetUp()
36+
protected function setUp()
4037
{
4138
$this->successHandler = $this->getMockBuilder('Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface')->getMock();
4239
$this->failureHandler = $this->getMockBuilder('Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface')->getMock();

Tests/Firewall/AccessListenerTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,10 @@
1212
namespace Symfony\Component\Security\Http\Tests\Firewall;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Security\Http\Firewall\AccessListener;
1716

1817
class AccessListenerTest extends TestCase
1918
{
20-
use ForwardCompatTestTrait;
21-
2219
public function testHandleWhenTheAccessDecisionManagerDecidesToRefuseAccess()
2320
{
2421
$this->expectException('Symfony\Component\Security\Core\Exception\AccessDeniedException');

Tests/Firewall/BasicAuthenticationListenerTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\Security\Http\Tests\Firewall;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\HttpFoundation\Request;
1716
use Symfony\Component\HttpFoundation\Response;
1817
use Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager;
@@ -22,8 +21,6 @@
2221

2322
class BasicAuthenticationListenerTest extends TestCase
2423
{
25-
use ForwardCompatTestTrait;
26-
2724
public function testHandleWithValidUsernameAndPasswordServerParameters()
2825
{
2926
$request = new Request([], [], [], [], [], [

Tests/Firewall/ContextListenerTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\Security\Http\Tests\Firewall;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\EventDispatcher\EventDispatcher;
1716
use Symfony\Component\HttpFoundation\Request;
1817
use Symfony\Component\HttpFoundation\Response;
@@ -35,8 +34,6 @@
3534

3635
class ContextListenerTest extends TestCase
3736
{
38-
use ForwardCompatTestTrait;
39-
4037
public function testItRequiresContextKey()
4138
{
4239
$this->expectException('InvalidArgumentException');

Tests/Firewall/DigestDataTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,13 @@
1212
namespace Symfony\Component\Security\Http\Tests\Firewall;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Security\Http\Firewall\DigestData;
1716

1817
/**
1918
* @group legacy
2019
*/
2120
class DigestDataTest extends TestCase
2221
{
23-
use ForwardCompatTestTrait;
24-
2522
public function testGetResponse()
2623
{
2724
$digestAuth = new DigestData(
@@ -166,7 +163,7 @@ public function testIsNonceExpired()
166163
$this->assertFalse($digestAuth->isNonceExpired());
167164
}
168165

169-
private function doSetUp()
166+
protected function setUp()
170167
{
171168
class_exists('Symfony\Component\Security\Http\Firewall\DigestAuthenticationListener', true);
172169
}

Tests/Firewall/LogoutListenerTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,12 @@
1212
namespace Symfony\Component\Security\Http\Tests\Firewall;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\HttpFoundation\Request;
1716
use Symfony\Component\HttpFoundation\Response;
1817
use Symfony\Component\Security\Http\Firewall\LogoutListener;
1918

2019
class LogoutListenerTest extends TestCase
2120
{
22-
use ForwardCompatTestTrait;
23-
2421
public function testHandleUnmatchedPath()
2522
{
2623
list($listener, $tokenStorage, $httpUtils, $options) = $this->getListener();

Tests/Firewall/RememberMeListenerTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,13 @@
1212
namespace Symfony\Component\Security\Http\Tests\Firewall;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\HttpFoundation\Request;
1716
use Symfony\Component\Security\Core\Exception\AuthenticationException;
1817
use Symfony\Component\Security\Http\Firewall\RememberMeListener;
1918
use Symfony\Component\Security\Http\SecurityEvents;
2019

2120
class RememberMeListenerTest extends TestCase
2221
{
23-
use ForwardCompatTestTrait;
24-
2522
public function testOnCoreSecurityDoesNotTryToPopulateNonEmptyTokenStorage()
2623
{
2724
list($listener, $tokenStorage) = $this->getListener();

Tests/Firewall/RemoteUserAuthenticationListenerTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,11 @@
1212
namespace Symfony\Component\Security\Http\Tests\Firewall;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\HttpFoundation\Request;
1716
use Symfony\Component\Security\Http\Firewall\RemoteUserAuthenticationListener;
1817

1918
class RemoteUserAuthenticationListenerTest extends TestCase
2019
{
21-
use ForwardCompatTestTrait;
22-
2320
public function testGetPreAuthenticatedData()
2421
{
2522
$serverVars = [

Tests/Firewall/SimplePreAuthenticationListenerTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\Security\Http\Tests\Firewall;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\HttpFoundation\Request;
1716
use Symfony\Component\Security\Core\Exception\AuthenticationException;
1817
use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
@@ -21,8 +20,6 @@
2120

2221
class SimplePreAuthenticationListenerTest extends TestCase
2322
{
24-
use ForwardCompatTestTrait;
25-
2623
private $authenticationManager;
2724
private $dispatcher;
2825
private $event;
@@ -96,7 +93,7 @@ public function testHandlecatchAuthenticationException()
9693
$listener->handle($this->event);
9794
}
9895

99-
private function doSetUp()
96+
protected function setUp()
10097
{
10198
$this->authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager')
10299
->disableOriginalConstructor()
@@ -119,7 +116,7 @@ private function doSetUp()
119116
$this->token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock();
120117
}
121118

122-
private function doTearDown()
119+
protected function tearDown()
123120
{
124121
$this->authenticationManager = null;
125122
$this->dispatcher = null;

0 commit comments

Comments
 (0)