Skip to content

Commit 7c39e20

Browse files
committed
Remove use of ForwardCompatTrait
1 parent 53edda5 commit 7c39e20

27 files changed

+4
-85
lines changed

Tests/Authentication/AuthenticationProviderManagerTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager;
1716
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1817
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
@@ -25,8 +24,6 @@
2524

2625
class AuthenticationProviderManagerTest extends TestCase
2726
{
28-
use ForwardCompatTestTrait;
29-
3027
public function testAuthenticateWithoutProviders()
3128
{
3229
$this->expectException('InvalidArgumentException');

Tests/Authentication/Provider/AnonymousAuthenticationProviderTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Security\Core\Authentication\Provider\AnonymousAuthenticationProvider;
1716

1817
class AnonymousAuthenticationProviderTest extends TestCase
1918
{
20-
use ForwardCompatTestTrait;
21-
2219
public function testSupports()
2320
{
2421
$provider = $this->getProvider('foo');

Tests/Authentication/Provider/DaoAuthenticationProviderTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Security\Core\Authentication\Provider\DaoAuthenticationProvider;
1716
use Symfony\Component\Security\Core\Encoder\PlaintextPasswordEncoder;
1817
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
1918

2019
class DaoAuthenticationProviderTest extends TestCase
2120
{
22-
use ForwardCompatTestTrait;
23-
2421
public function testRetrieveUserWhenProviderDoesNotReturnAnUserInterface()
2522
{
2623
$this->expectException('Symfony\Component\Security\Core\Exception\AuthenticationServiceException');

Tests/Authentication/Provider/LdapBindAuthenticationProviderTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Ldap\Adapter\CollectionInterface;
1716
use Symfony\Component\Ldap\Adapter\QueryInterface;
1817
use Symfony\Component\Ldap\Entry;
@@ -29,8 +28,6 @@
2928
*/
3029
class LdapBindAuthenticationProviderTest extends TestCase
3130
{
32-
use ForwardCompatTestTrait;
33-
3431
public function testEmptyPasswordShouldThrowAnException()
3532
{
3633
$this->expectException('Symfony\Component\Security\Core\Exception\BadCredentialsException');

Tests/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Security\Core\Authentication\Provider\PreAuthenticatedAuthenticationProvider;
1716
use Symfony\Component\Security\Core\Exception\LockedException;
1817

1918
class PreAuthenticatedAuthenticationProviderTest extends TestCase
2019
{
21-
use ForwardCompatTestTrait;
22-
2320
public function testSupports()
2421
{
2522
$provider = $this->getProvider();

Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Security\Core\Authentication\Provider\RememberMeAuthenticationProvider;
1716
use Symfony\Component\Security\Core\Exception\DisabledException;
1817
use Symfony\Component\Security\Core\Role\Role;
1918

2019
class RememberMeAuthenticationProviderTest extends TestCase
2120
{
22-
use ForwardCompatTestTrait;
23-
2421
public function testSupports()
2522
{
2623
$provider = $this->getProvider();

Tests/Authentication/Provider/SimpleAuthenticationProviderTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Security\Core\Authentication\Provider\SimpleAuthenticationProvider;
1716
use Symfony\Component\Security\Core\Exception\DisabledException;
1817
use Symfony\Component\Security\Core\Exception\LockedException;
1918
use Symfony\Component\Security\Core\User\UserChecker;
2019

2120
class SimpleAuthenticationProviderTest extends TestCase
2221
{
23-
use ForwardCompatTestTrait;
24-
2522
public function testAuthenticateWhenPreChecksFails()
2623
{
2724
$this->expectException('Symfony\Component\Security\Core\Exception\DisabledException');

Tests/Authentication/Provider/UserAuthenticationProviderTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Security\Core\Exception\AccountExpiredException;
1716
use Symfony\Component\Security\Core\Exception\BadCredentialsException;
1817
use Symfony\Component\Security\Core\Exception\CredentialsExpiredException;
@@ -22,8 +21,6 @@
2221

2322
class UserAuthenticationProviderTest extends TestCase
2423
{
25-
use ForwardCompatTestTrait;
26-
2724
public function testSupports()
2825
{
2926
$provider = $this->getProvider();

Tests/Authentication/RememberMe/InMemoryTokenProviderTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Security\Core\Authentication\RememberMe\InMemoryTokenProvider;
1716
use Symfony\Component\Security\Core\Authentication\RememberMe\PersistentToken;
1817

1918
class InMemoryTokenProviderTest extends TestCase
2019
{
21-
use ForwardCompatTestTrait;
22-
2320
public function testCreateNewToken()
2421
{
2522
$provider = new InMemoryTokenProvider();

Tests/Authentication/Token/RememberMeTokenTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Security\Core\Authentication\Token\RememberMeToken;
1716
use Symfony\Component\Security\Core\Role\Role;
1817

1918
class RememberMeTokenTest extends TestCase
2019
{
21-
use ForwardCompatTestTrait;
22-
2320
public function testConstructor()
2421
{
2522
$user = $this->getUser();

Tests/Authentication/Token/UsernamePasswordTokenTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
1716
use Symfony\Component\Security\Core\Role\Role;
1817

1918
class UsernamePasswordTokenTest extends TestCase
2019
{
21-
use ForwardCompatTestTrait;
22-
2320
public function testConstructor()
2421
{
2522
$token = new UsernamePasswordToken('foo', 'bar', 'key');

Tests/Authorization/AccessDecisionManagerTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1716
use Symfony\Component\Security\Core\Authorization\AccessDecisionManager;
1817
use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
@@ -21,8 +20,6 @@
2120

2221
class AccessDecisionManagerTest extends TestCase
2322
{
24-
use ForwardCompatTestTrait;
25-
2623
public function testSetUnsupportedStrategy()
2724
{
2825
$this->expectException('InvalidArgumentException');

Tests/Authorization/AuthorizationCheckerTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,17 @@
1212
namespace Symfony\Component\Security\Core\Tests\Authorization;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
1716
use Symfony\Component\Security\Core\Authorization\AuthorizationChecker;
1817

1918
class AuthorizationCheckerTest extends TestCase
2019
{
21-
use ForwardCompatTestTrait;
22-
2320
private $authenticationManager;
2421
private $accessDecisionManager;
2522
private $authorizationChecker;
2623
private $tokenStorage;
2724

28-
private function doSetUp()
25+
protected function setUp()
2926
{
3027
$this->authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock();
3128
$this->accessDecisionManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface')->getMock();

Tests/Authorization/Voter/VoterTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,15 @@
1212
namespace Symfony\Component\Security\Core\Tests\Authorization\Voter;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1716
use Symfony\Component\Security\Core\Authorization\Voter\Voter;
1817
use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
1918

2019
class VoterTest extends TestCase
2120
{
22-
use ForwardCompatTestTrait;
23-
2421
protected $token;
2522

26-
private function doSetUp()
23+
protected function setUp()
2724
{
2825
$this->token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock();
2926
}

Tests/Encoder/Argon2iPasswordEncoderTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Security\Core\Encoder\Argon2iPasswordEncoder;
1716

1817
/**
1918
* @author Zan Baldwin <[email protected]>
2019
*/
2120
class Argon2iPasswordEncoderTest extends TestCase
2221
{
23-
use ForwardCompatTestTrait;
24-
2522
const PASSWORD = 'password';
2623

27-
private function doSetUp()
24+
protected function setUp()
2825
{
2926
if (!Argon2iPasswordEncoder::isSupported()) {
3027
$this->markTestSkipped('Argon2i algorithm is not supported.');

Tests/Encoder/BCryptPasswordEncoderTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Security\Core\Encoder\BCryptPasswordEncoder;
1716

1817
/**
1918
* @author Elnur Abdurrakhimov <[email protected]>
2019
*/
2120
class BCryptPasswordEncoderTest extends TestCase
2221
{
23-
use ForwardCompatTestTrait;
24-
2522
const PASSWORD = 'password';
2623
const VALID_COST = '04';
2724

Tests/Encoder/BasePasswordEncoderTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Security\Core\Encoder\BasePasswordEncoder;
1716

1817
class PasswordEncoder extends BasePasswordEncoder
@@ -28,8 +27,6 @@ public function isPasswordValid($encoded, $raw, $salt)
2827

2928
class BasePasswordEncoderTest extends TestCase
3029
{
31-
use ForwardCompatTestTrait;
32-
3330
public function testComparePassword()
3431
{
3532
$this->assertTrue($this->invokeComparePasswords('password', 'password'));

Tests/Encoder/EncoderFactoryTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Security\Core\Encoder\EncoderAwareInterface;
1716
use Symfony\Component\Security\Core\Encoder\EncoderFactory;
1817
use Symfony\Component\Security\Core\Encoder\MessageDigestPasswordEncoder;
@@ -21,8 +20,6 @@
2120

2221
class EncoderFactoryTest extends TestCase
2322
{
24-
use ForwardCompatTestTrait;
25-
2623
public function testGetEncoderWithMessageDigestEncoder()
2724
{
2825
$factory = new EncoderFactory(['Symfony\Component\Security\Core\User\UserInterface' => [

Tests/Encoder/MessageDigestPasswordEncoderTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Security\Core\Encoder\MessageDigestPasswordEncoder;
1716

1817
class MessageDigestPasswordEncoderTest extends TestCase
1918
{
20-
use ForwardCompatTestTrait;
21-
2219
public function testIsPasswordValid()
2320
{
2421
$encoder = new MessageDigestPasswordEncoder('sha256', false, 1);

Tests/Encoder/Pbkdf2PasswordEncoderTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Security\Core\Encoder\Pbkdf2PasswordEncoder;
1716

1817
class Pbkdf2PasswordEncoderTest extends TestCase
1918
{
20-
use ForwardCompatTestTrait;
21-
2219
public function testIsPasswordValid()
2320
{
2421
$encoder = new Pbkdf2PasswordEncoder('sha256', false, 1, 40);

Tests/Encoder/PlaintextPasswordEncoderTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Security\Core\Encoder\PlaintextPasswordEncoder;
1716

1817
class PlaintextPasswordEncoderTest extends TestCase
1918
{
20-
use ForwardCompatTestTrait;
21-
2219
public function testIsPasswordValid()
2320
{
2421
$encoder = new PlaintextPasswordEncoder();

Tests/User/ChainUserProviderTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
1716
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
1817
use Symfony\Component\Security\Core\User\ChainUserProvider;
1918

2019
class ChainUserProviderTest extends TestCase
2120
{
22-
use ForwardCompatTestTrait;
23-
2421
public function testLoadUserByUsername()
2522
{
2623
$provider1 = $this->getProvider();

Tests/User/InMemoryUserProviderTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Security\Core\User\InMemoryUserProvider;
1716
use Symfony\Component\Security\Core\User\User;
1817

1918
class InMemoryUserProviderTest extends TestCase
2019
{
21-
use ForwardCompatTestTrait;
22-
2320
public function testConstructor()
2421
{
2522
$provider = $this->createProvider();

Tests/User/LdapUserProviderTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Ldap\Adapter\CollectionInterface;
1716
use Symfony\Component\Ldap\Adapter\QueryInterface;
1817
use Symfony\Component\Ldap\Entry;
@@ -25,8 +24,6 @@
2524
*/
2625
class LdapUserProviderTest extends TestCase
2726
{
28-
use ForwardCompatTestTrait;
29-
3027
public function testLoadUserByUsernameFailsIfCantConnectToLdap()
3128
{
3229
$this->expectException('Symfony\Component\Security\Core\Exception\UsernameNotFoundException');

0 commit comments

Comments
 (0)