diff options
author | Fabien Potencier <fabien.potencier@gmail.com> | 2015-01-03 15:49:25 +0100 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2015-01-03 15:49:25 +0100 |
commit | 0e0bddb6cd3fda22a89662fd2476d05f11d10fef (patch) | |
tree | 7f374042f1a39eb89aeb4112987a77e530792704 | |
parent | 21d39918e40684006c679a53c528d361b3265b66 (diff) | |
parent | 58c7534305b398ab5752798ef5eb9f0e91cfc034 (diff) | |
download | symfony-security-0e0bddb6cd3fda22a89662fd2476d05f11d10fef.zip symfony-security-0e0bddb6cd3fda22a89662fd2476d05f11d10fef.tar.gz symfony-security-0e0bddb6cd3fda22a89662fd2476d05f11d10fef.tar.bz2 |
minor #13206 [2.3] Cleanup deprecations (nicolas-grekas)
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3] Cleanup deprecations
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | let's see
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
d649bef [2.3] Remove useless tests skips
1d68ad3 [2.3] Cleanup deprecations
37 files changed, 1 insertions, 323 deletions
diff --git a/Tests/Acl/Dbal/AclProviderBenchmarkTest.php b/Tests/Acl/Dbal/AclProviderBenchmarkTest.php index 46f4356..c25a697 100644 --- a/Tests/Acl/Dbal/AclProviderBenchmarkTest.php +++ b/Tests/Acl/Dbal/AclProviderBenchmarkTest.php @@ -32,10 +32,6 @@ class AclProviderBenchmarkTest extends \PHPUnit_Framework_TestCase protected function setUp() { - if (!class_exists('Doctrine\DBAL\DriverManager')) { - $this->markTestSkipped('The "Doctrine DBAL" library is not available'); - } - try { $this->con = DriverManager::getConnection(array( 'driver' => 'pdo_mysql', diff --git a/Tests/Acl/Dbal/AclProviderTest.php b/Tests/Acl/Dbal/AclProviderTest.php index ad58d72..d701e22 100644 --- a/Tests/Acl/Dbal/AclProviderTest.php +++ b/Tests/Acl/Dbal/AclProviderTest.php @@ -141,9 +141,6 @@ class AclProviderTest extends \PHPUnit_Framework_TestCase protected function setUp() { - if (!class_exists('Doctrine\DBAL\DriverManager')) { - $this->markTestSkipped('The Doctrine2 DBAL is required for this test'); - } if (!class_exists('PDO') || !in_array('sqlite', \PDO::getAvailableDrivers())) { self::markTestSkipped('This test requires SQLite support in your environment'); } diff --git a/Tests/Acl/Dbal/MutableAclProviderTest.php b/Tests/Acl/Dbal/MutableAclProviderTest.php index 21ea670..faa9261 100644 --- a/Tests/Acl/Dbal/MutableAclProviderTest.php +++ b/Tests/Acl/Dbal/MutableAclProviderTest.php @@ -483,9 +483,6 @@ class MutableAclProviderTest extends \PHPUnit_Framework_TestCase protected function setUp() { - if (!class_exists('Doctrine\DBAL\DriverManager')) { - $this->markTestSkipped('The Doctrine2 DBAL is required for this test'); - } if (!class_exists('PDO') || !in_array('sqlite', \PDO::getAvailableDrivers())) { self::markTestSkipped('This test requires SQLite support in your environment'); } diff --git a/Tests/Acl/Domain/AclTest.php b/Tests/Acl/Domain/AclTest.php index 0e88ab8..9be4a94 100644 --- a/Tests/Acl/Domain/AclTest.php +++ b/Tests/Acl/Domain/AclTest.php @@ -510,11 +510,4 @@ class AclTest extends \PHPUnit_Framework_TestCase { return new Acl(1, new ObjectIdentity(1, 'foo'), new PermissionGrantingStrategy(), array(), true); } - - protected function setUp() - { - if (!class_exists('Doctrine\DBAL\DriverManager')) { - $this->markTestSkipped('The Doctrine2 DBAL is required for this test'); - } - } } diff --git a/Tests/Acl/Domain/DoctrineAclCacheTest.php b/Tests/Acl/Domain/DoctrineAclCacheTest.php index 99eb27e..93c87c1 100644 --- a/Tests/Acl/Domain/DoctrineAclCacheTest.php +++ b/Tests/Acl/Domain/DoctrineAclCacheTest.php @@ -98,11 +98,4 @@ class DoctrineAclCacheTest extends \PHPUnit_Framework_TestCase return new DoctrineAclCache($cacheDriver, $this->getPermissionGrantingStrategy(), $prefix); } - - protected function setUp() - { - if (!class_exists('Doctrine\DBAL\DriverManager')) { - $this->markTestSkipped('The Doctrine2 DBAL is required for this test'); - } - } } diff --git a/Tests/Acl/Domain/ObjectIdentityTest.php b/Tests/Acl/Domain/ObjectIdentityTest.php index 7aa3cf2..9281fd5 100644 --- a/Tests/Acl/Domain/ObjectIdentityTest.php +++ b/Tests/Acl/Domain/ObjectIdentityTest.php @@ -85,13 +85,6 @@ namespace Symfony\Component\Security\Tests\Acl\Domain array(new ObjectIdentity('1', 'bla'), new ObjectIdentity('1', 'blub'), false), ); } - - protected function setUp() - { - if (!class_exists('Doctrine\DBAL\DriverManager')) { - $this->markTestSkipped('The Doctrine2 DBAL is required for this test'); - } - } } class TestDomainObject diff --git a/Tests/Acl/Domain/PermissionGrantingStrategyTest.php b/Tests/Acl/Domain/PermissionGrantingStrategyTest.php index 4698a72..4935bff 100644 --- a/Tests/Acl/Domain/PermissionGrantingStrategyTest.php +++ b/Tests/Acl/Domain/PermissionGrantingStrategyTest.php @@ -183,11 +183,4 @@ class PermissionGrantingStrategyTest extends \PHPUnit_Framework_TestCase return new Acl($id++, new ObjectIdentity(1, 'Foo'), $strategy, array(), true); } - - protected function setUp() - { - if (!class_exists('Doctrine\DBAL\DriverManager')) { - $this->markTestSkipped('The Doctrine2 DBAL is required for this test'); - } - } } diff --git a/Tests/Core/Validator/Constraints/UserPasswordValidatorTest.php b/Tests/Core/Validator/Constraints/UserPasswordValidatorTest.php index 600f518..4c420c7 100644 --- a/Tests/Core/Validator/Constraints/UserPasswordValidatorTest.php +++ b/Tests/Core/Validator/Constraints/UserPasswordValidatorTest.php @@ -23,10 +23,6 @@ class UserPasswordValidatorTest extends \PHPUnit_Framework_TestCase protected function setUp() { - if (false === class_exists('Symfony\Component\Validator\Validator')) { - $this->markTestSkipped('The Validator component is required for this test.'); - } - $this->context = $this->getMock('Symfony\Component\Validator\ExecutionContext', array(), array(), '', false); } diff --git a/Tests/Http/AccessMapTest.php b/Tests/Http/AccessMapTest.php index 653152a..c2d9b7f 100644 --- a/Tests/Http/AccessMapTest.php +++ b/Tests/Http/AccessMapTest.php @@ -15,13 +15,6 @@ use Symfony\Component\Security\Http\AccessMap; class AccessMapTest extends \PHPUnit_Framework_TestCase { - protected function setUp() - { - if (!class_exists('Symfony\Component\HttpFoundation\Request')) { - $this->markTestSkipped('The "HttpFoundation" component is not available'); - } - } - public function testReturnsFirstMatchedPattern() { $request = $this->getMock('Symfony\Component\HttpFoundation\Request'); diff --git a/Tests/Http/Authentication/DefaultAuthenticationFailureHandlerTest.php b/Tests/Http/Authentication/DefaultAuthenticationFailureHandlerTest.php index e610b6b..accc45d 100644 --- a/Tests/Http/Authentication/DefaultAuthenticationFailureHandlerTest.php +++ b/Tests/Http/Authentication/DefaultAuthenticationFailureHandlerTest.php @@ -31,18 +31,6 @@ class DefaultAuthenticationFailureHandlerTest extends \PHPUnit_Framework_TestCas protected function setUp() { - if (!class_exists('Symfony\Component\HttpKernel\HttpKernel')) { - $this->markTestSkipped('The "HttpKernel" component is not available'); - } - - if (!class_exists('Symfony\Component\HttpFoundation\Request')) { - $this->markTestSkipped('The "HttpFoundation" component is not available'); - } - - if (!interface_exists('Psr\Log\LoggerInterface')) { - $this->markTestSkipped('The "LoggerInterface" is not available'); - } - $this->httpKernel = $this->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'); $this->httpUtils = $this->getMock('Symfony\Component\Security\Http\HttpUtils'); $this->logger = $this->getMock('Psr\Log\LoggerInterface'); diff --git a/Tests/Http/Authentication/DefaultAuthenticationSuccessHandlerTest.php b/Tests/Http/Authentication/DefaultAuthenticationSuccessHandlerTest.php index aa5902b..3d8ebf3 100644 --- a/Tests/Http/Authentication/DefaultAuthenticationSuccessHandlerTest.php +++ b/Tests/Http/Authentication/DefaultAuthenticationSuccessHandlerTest.php @@ -23,10 +23,6 @@ class DefaultAuthenticationSuccessHandlerTest extends \PHPUnit_Framework_TestCas protected function setUp() { - if (!class_exists('Symfony\Component\HttpFoundation\Request')) { - $this->markTestSkipped('The "HttpFoundation" component is not available'); - } - $this->httpUtils = $this->getMock('Symfony\Component\Security\Http\HttpUtils'); $this->request = $this->getMock('Symfony\Component\HttpFoundation\Request'); $this->request->headers = $this->getMock('Symfony\Component\HttpFoundation\HeaderBag'); diff --git a/Tests/Http/EntryPoint/BasicAuthenticationEntryPointTest.php b/Tests/Http/EntryPoint/BasicAuthenticationEntryPointTest.php index b9e289d..5640789 100644 --- a/Tests/Http/EntryPoint/BasicAuthenticationEntryPointTest.php +++ b/Tests/Http/EntryPoint/BasicAuthenticationEntryPointTest.php @@ -16,13 +16,6 @@ use Symfony\Component\Security\Core\Exception\AuthenticationException; class BasicAuthenticationEntryPointTest extends \PHPUnit_Framework_TestCase { - protected function setUp() - { - if (!class_exists('Symfony\Component\HttpFoundation\Request')) { - $this->markTestSkipped('The "HttpFoundation" component is not available'); - } - } - public function testStart() { $request = $this->getMock('Symfony\Component\HttpFoundation\Request'); diff --git a/Tests/Http/EntryPoint/DigestAuthenticationEntryPointTest.php b/Tests/Http/EntryPoint/DigestAuthenticationEntryPointTest.php index 8dfd618..5c6eccc 100644 --- a/Tests/Http/EntryPoint/DigestAuthenticationEntryPointTest.php +++ b/Tests/Http/EntryPoint/DigestAuthenticationEntryPointTest.php @@ -17,13 +17,6 @@ use Symfony\Component\Security\Core\Exception\NonceExpiredException; class DigestAuthenticationEntryPointTest extends \PHPUnit_Framework_TestCase { - protected function setUp() - { - if (!class_exists('Symfony\Component\HttpFoundation\Request')) { - $this->markTestSkipped('The "HttpFoundation" component is not available'); - } - } - public function testStart() { $request = $this->getMock('Symfony\Component\HttpFoundation\Request'); diff --git a/Tests/Http/EntryPoint/FormAuthenticationEntryPointTest.php b/Tests/Http/EntryPoint/FormAuthenticationEntryPointTest.php index cbec1bd..097912d 100644 --- a/Tests/Http/EntryPoint/FormAuthenticationEntryPointTest.php +++ b/Tests/Http/EntryPoint/FormAuthenticationEntryPointTest.php @@ -16,17 +16,6 @@ use Symfony\Component\HttpKernel\HttpKernelInterface; class FormAuthenticationEntryPointTest extends \PHPUnit_Framework_TestCase { - protected function setUp() - { - if (!class_exists('Symfony\Component\HttpFoundation\Request')) { - $this->markTestSkipped('The "HttpFoundation" component is not available'); - } - - if (!class_exists('Symfony\Component\HttpKernel\HttpKernel')) { - $this->markTestSkipped('The "HttpKernel" component is not available'); - } - } - public function testStart() { $request = $this->getMock('Symfony\Component\HttpFoundation\Request', array(), array(), '', false, false); diff --git a/Tests/Http/EntryPoint/RetryAuthenticationEntryPointTest.php b/Tests/Http/EntryPoint/RetryAuthenticationEntryPointTest.php index 95c73d2..59ec912 100644 --- a/Tests/Http/EntryPoint/RetryAuthenticationEntryPointTest.php +++ b/Tests/Http/EntryPoint/RetryAuthenticationEntryPointTest.php @@ -16,13 +16,6 @@ use Symfony\Component\HttpFoundation\Request; class RetryAuthenticationEntryPointTest extends \PHPUnit_Framework_TestCase { - protected function setUp() - { - if (!class_exists('Symfony\Component\HttpFoundation\Request')) { - $this->markTestSkipped('The "HttpFoundation" component is not available'); - } - } - /** * @dataProvider dataForStart */ diff --git a/Tests/Http/Firewall/AbstractPreAuthenticatedListenerTest.php b/Tests/Http/Firewall/AbstractPreAuthenticatedListenerTest.php index 34263bc..d6373b3 100644 --- a/Tests/Http/Firewall/AbstractPreAuthenticatedListenerTest.php +++ b/Tests/Http/Firewall/AbstractPreAuthenticatedListenerTest.php @@ -18,21 +18,6 @@ use Symfony\Component\Security\Core\Exception\AuthenticationException; class AbstractPreAuthenticatedListenerTest extends \PHPUnit_Framework_TestCase { - protected function setUp() - { - if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) { - $this->markTestSkipped('The "EventDispatcher" component is not available'); - } - - if (!class_exists('Symfony\Component\HttpFoundation\Request')) { - $this->markTestSkipped('The "HttpFoundation" component is not available'); - } - - if (!class_exists('Symfony\Component\HttpKernel\HttpKernel')) { - $this->markTestSkipped('The "HttpKernel" component is not available'); - } - } - public function testHandleWithValidValues() { $userCredentials = array('TheUser', 'TheCredentials'); diff --git a/Tests/Http/Firewall/AccessListenerTest.php b/Tests/Http/Firewall/AccessListenerTest.php index 53ab350..961c792 100644 --- a/Tests/Http/Firewall/AccessListenerTest.php +++ b/Tests/Http/Firewall/AccessListenerTest.php @@ -15,21 +15,6 @@ use Symfony\Component\Security\Http\Firewall\AccessListener; class AccessListenerTest extends \PHPUnit_Framework_TestCase { - protected function setUp() - { - if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) { - $this->markTestSkipped('The "EventDispatcher" component is not available'); - } - - if (!class_exists('Symfony\Component\HttpFoundation\Request')) { - $this->markTestSkipped('The "HttpFoundation" component is not available'); - } - - if (!class_exists('Symfony\Component\HttpKernel\HttpKernel')) { - $this->markTestSkipped('The "HttpKernel" component is not available'); - } - } - /** * @expectedException \Symfony\Component\Security\Core\Exception\AccessDeniedException */ diff --git a/Tests/Http/Firewall/AnonymousAuthenticationListenerTest.php b/Tests/Http/Firewall/AnonymousAuthenticationListenerTest.php index 73ee821..0666ef3 100644 --- a/Tests/Http/Firewall/AnonymousAuthenticationListenerTest.php +++ b/Tests/Http/Firewall/AnonymousAuthenticationListenerTest.php @@ -15,13 +15,6 @@ use Symfony\Component\Security\Http\Firewall\AnonymousAuthenticationListener; class AnonymousAuthenticationListenerTest extends \PHPUnit_Framework_TestCase { - protected function setUp() - { - if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) { - $this->markTestSkipped('The "EventDispatcher" component is not available'); - } - } - public function testHandleWithContextHavingAToken() { $context = $this->getMock('Symfony\Component\Security\Core\SecurityContextInterface'); @@ -62,10 +55,6 @@ class AnonymousAuthenticationListenerTest extends \PHPUnit_Framework_TestCase public function testHandledEventIsLogged() { - if (!interface_exists('Psr\Log\LoggerInterface')) { - $this->markTestSkipped('The "LoggerInterface" is not available'); - } - $context = $this->getMock('Symfony\Component\Security\Core\SecurityContextInterface'); $logger = $this->getMock('Psr\Log\LoggerInterface'); $logger->expects($this->once()) diff --git a/Tests/Http/Firewall/BasicAuthenticationListenerTest.php b/Tests/Http/Firewall/BasicAuthenticationListenerTest.php index 2c94463..65dc185 100644 --- a/Tests/Http/Firewall/BasicAuthenticationListenerTest.php +++ b/Tests/Http/Firewall/BasicAuthenticationListenerTest.php @@ -20,21 +20,6 @@ use Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager class BasicAuthenticationListenerTest extends \PHPUnit_Framework_TestCase { - protected function setUp() - { - if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) { - $this->markTestSkipped('The "EventDispatcher" component is not available'); - } - - if (!class_exists('Symfony\Component\HttpFoundation\Request')) { - $this->markTestSkipped('The "HttpFoundation" component is not available'); - } - - if (!class_exists('Symfony\Component\HttpKernel\HttpKernel')) { - $this->markTestSkipped('The "HttpKernel" component is not available'); - } - } - public function testHandleWithValidUsernameAndPasswordServerParameters() { $request = new Request(array(), array(), array(), array(), array(), array( diff --git a/Tests/Http/Firewall/ChannelListenerTest.php b/Tests/Http/Firewall/ChannelListenerTest.php index e33a8dc..5e583e0 100644 --- a/Tests/Http/Firewall/ChannelListenerTest.php +++ b/Tests/Http/Firewall/ChannelListenerTest.php @@ -16,21 +16,6 @@ use Symfony\Component\HttpFoundation\Response; class ChannelListenerTest extends \PHPUnit_Framework_TestCase { - protected function setUp() - { - if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) { - $this->markTestSkipped('The "EventDispatcher" component is not available'); - } - - if (!class_exists('Symfony\Component\HttpFoundation\Request')) { - $this->markTestSkipped('The "HttpFoundation" component is not available'); - } - - if (!class_exists('Symfony\Component\HttpKernel\HttpKernel')) { - $this->markTestSkipped('The "HttpKernel" component is not available'); - } - } - public function testHandleWithNotSecuredRequestAndHttpChannel() { $request = $this->getMock('Symfony\Component\HttpFoundation\Request', array(), array(), '', false, false); diff --git a/Tests/Http/Firewall/ContextListenerTest.php b/Tests/Http/Firewall/ContextListenerTest.php index 1429f26..f44c60a 100644 --- a/Tests/Http/Firewall/ContextListenerTest.php +++ b/Tests/Http/Firewall/ContextListenerTest.php @@ -26,18 +26,6 @@ class ContextListenerTest extends \PHPUnit_Framework_TestCase { protected function setUp() { - if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) { - $this->markTestSkipped('The "EventDispatcher" component is not available'); - } - - if (!class_exists('Symfony\Component\HttpFoundation\Request')) { - $this->markTestSkipped('The "HttpFoundation" component is not available'); - } - - if (!class_exists('Symfony\Component\HttpKernel\HttpKernel')) { - $this->markTestSkipped('The "HttpKernel" component is not available'); - } - $this->securityContext = new SecurityContext( $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface'), $this->getMock('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface') diff --git a/Tests/Http/Firewall/LogoutListenerTest.php b/Tests/Http/Firewall/LogoutListenerTest.php index 58f6adb..9301086 100644 --- a/Tests/Http/Firewall/LogoutListenerTest.php +++ b/Tests/Http/Firewall/LogoutListenerTest.php @@ -17,25 +17,6 @@ use Symfony\Component\Security\Http\Firewall\LogoutListener; class LogoutListenerTest extends \PHPUnit_Framework_TestCase { - protected function setUp() - { - if (!class_exists('Symfony\Component\Form\Form')) { - $this->markTestSkipped('The "Form" component is not available'); - } - - if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) { - $this->markTestSkipped('The "EventDispatcher" component is not available'); - } - - if (!class_exists('Symfony\Component\HttpFoundation\Request')) { - $this->markTestSkipped('The "HttpFoundation" component is not available'); - } - - if (!class_exists('Symfony\Component\HttpKernel\HttpKernel')) { - $this->markTestSkipped('The "HttpKernel" component is not available'); - } - } - public function testHandleUnmatchedPath() { list($listener, $context, $httpUtils, $options) = $this->getListener(); diff --git a/Tests/Http/Firewall/RememberMeListenerTest.php b/Tests/Http/Firewall/RememberMeListenerTest.php index 301bd6f..3624f11 100644 --- a/Tests/Http/Firewall/RememberMeListenerTest.php +++ b/Tests/Http/Firewall/RememberMeListenerTest.php @@ -17,21 +17,6 @@ use Symfony\Component\HttpFoundation\Request; class RememberMeListenerTest extends \PHPUnit_Framework_TestCase { - protected function setUp() - { - if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) { - $this->markTestSkipped('The "EventDispatcher" component is not available'); - } - - if (!class_exists('Symfony\Component\HttpFoundation\Request')) { - $this->markTestSkipped('The "HttpFoundation" component is not available'); - } - - if (!class_exists('Symfony\Component\HttpKernel\HttpKernel')) { - $this->markTestSkipped('The "HttpKernel" component is not available'); - } - } - public function testOnCoreSecurityDoesNotTryToPopulateNonEmptySecurityContext() { list($listener, $context, $service, ,) = $this->getListener(); diff --git a/Tests/Http/Firewall/SwitchUserListenerTest.php b/Tests/Http/Firewall/SwitchUserListenerTest.php index f8bb9f6..e86ee83 100644 --- a/Tests/Http/Firewall/SwitchUserListenerTest.php +++ b/Tests/Http/Firewall/SwitchUserListenerTest.php @@ -29,14 +29,6 @@ class SwitchUserListenerTest extends \PHPUnit_Framework_TestCase protected function setUp() { - if (!class_exists('Symfony\Component\HttpFoundation\Request')) { - $this->markTestSkipped('The "HttpFoundation" component is not available'); - } - - if (!class_exists('Symfony\Component\HttpKernel\HttpKernel')) { - $this->markTestSkipped('The "HttpKernel" component is not available'); - } - $this->securityContext = $this->getMock('Symfony\Component\Security\Core\SecurityContextInterface'); $this->userProvider = $this->getMock('Symfony\Component\Security\Core\User\UserProviderInterface'); $this->userChecker = $this->getMock('Symfony\Component\Security\Core\User\UserCheckerInterface'); diff --git a/Tests/Http/Firewall/X509AuthenticationListenerTest.php b/Tests/Http/Firewall/X509AuthenticationListenerTest.php index 1ba7311..b28c0ac 100644 --- a/Tests/Http/Firewall/X509AuthenticationListenerTest.php +++ b/Tests/Http/Firewall/X509AuthenticationListenerTest.php @@ -16,13 +16,6 @@ use Symfony\Component\Security\Http\Firewall\X509AuthenticationListener; class X509AuthenticationListenerTest extends \PHPUnit_Framework_TestCase { - protected function setUp() - { - if (!class_exists('Symfony\Component\HttpFoundation\Request')) { - $this->markTestSkipped('The "HttpFoundation" component is not available'); - } - } - /** * @dataProvider dataProviderGetPreAuthenticatedData */ diff --git a/Tests/Http/FirewallMapTest.php b/Tests/Http/FirewallMapTest.php index c7f13e1..5d3a72a 100644 --- a/Tests/Http/FirewallMapTest.php +++ b/Tests/Http/FirewallMapTest.php @@ -16,17 +16,6 @@ use Symfony\Component\HttpFoundation\Request; class FirewallMapTest extends \PHPUnit_Framework_TestCase { - protected function setUp() - { - if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) { - $this->markTestSkipped('The "EventDispatcher" component is not available'); - } - - if (!class_exists('Symfony\Component\HttpFoundation\Request')) { - $this->markTestSkipped('The "HttpFoundation" component is not available'); - } - } - public function testGetListeners() { $map = new FirewallMap(); diff --git a/Tests/Http/FirewallTest.php b/Tests/Http/FirewallTest.php index 8932b10..7fd2cda 100644 --- a/Tests/Http/FirewallTest.php +++ b/Tests/Http/FirewallTest.php @@ -17,21 +17,6 @@ use Symfony\Component\HttpKernel\HttpKernelInterface; class FirewallTest extends \PHPUnit_Framework_TestCase { - protected function setUp() - { - if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) { - $this->markTestSkipped('The "EventDispatcher" component is not available'); - } - - if (!class_exists('Symfony\Component\HttpFoundation\Request')) { - $this->markTestSkipped('The "HttpFoundation" component is not available'); - } - - if (!class_exists('Symfony\Component\HttpKernel\HttpKernel')) { - $this->markTestSkipped('The "HttpKernel" component is not available'); - } - } - public function testOnKernelRequestRegistersExceptionListener() { $dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); diff --git a/Tests/Http/HttpUtilsTest.php b/Tests/Http/HttpUtilsTest.php index 2e281fd..019af19 100644 --- a/Tests/Http/HttpUtilsTest.php +++ b/Tests/Http/HttpUtilsTest.php @@ -19,17 +19,6 @@ use Symfony\Component\Security\Http\HttpUtils; class HttpUtilsTest extends \PHPUnit_Framework_TestCase { - protected function setUp() - { - if (!class_exists('Symfony\Component\HttpFoundation\Request')) { - $this->markTestSkipped('The "HttpFoundation" component is not available'); - } - - if (!class_exists('Symfony\Component\Routing\Router')) { - $this->markTestSkipped('The "Routing" component is not available'); - } - } - public function testCreateRedirectResponseWithPath() { $utils = new HttpUtils($this->getUrlGenerator()); diff --git a/Tests/Http/Logout/CookieClearingLogoutHandlerTest.php b/Tests/Http/Logout/CookieClearingLogoutHandlerTest.php index b32a813..c443d8d 100644 --- a/Tests/Http/Logout/CookieClearingLogoutHandlerTest.php +++ b/Tests/Http/Logout/CookieClearingLogoutHandlerTest.php @@ -18,13 +18,6 @@ use Symfony\Component\Security\Http\Logout\CookieClearingLogoutHandler; class CookieClearingLogoutHandlerTest extends \PHPUnit_Framework_TestCase { - protected function setUp() - { - if (!class_exists('Symfony\Component\HttpFoundation\Request')) { - $this->markTestSkipped('The "HttpFoundation" component is not available'); - } - } - public function testLogout() { $request = new Request(); diff --git a/Tests/Http/Logout/DefaultLogoutSuccessHandlerTest.php b/Tests/Http/Logout/DefaultLogoutSuccessHandlerTest.php index 562d127..f18604d 100644 --- a/Tests/Http/Logout/DefaultLogoutSuccessHandlerTest.php +++ b/Tests/Http/Logout/DefaultLogoutSuccessHandlerTest.php @@ -15,13 +15,6 @@ use Symfony\Component\Security\Http\Logout\DefaultLogoutSuccessHandler; class DefaultLogoutSuccessHandlerTest extends \PHPUnit_Framework_TestCase { - protected function setUp() - { - if (!class_exists('Symfony\Component\HttpFoundation\Request')) { - $this->markTestSkipped('The "HttpFoundation" component is not available'); - } - } - public function testLogout() { $request = $this->getMock('Symfony\Component\HttpFoundation\Request'); diff --git a/Tests/Http/Logout/SessionLogoutHandlerTest.php b/Tests/Http/Logout/SessionLogoutHandlerTest.php index 8e2dd28..f89a423 100644 --- a/Tests/Http/Logout/SessionLogoutHandlerTest.php +++ b/Tests/Http/Logout/SessionLogoutHandlerTest.php @@ -16,13 +16,6 @@ use Symfony\Component\Security\Http\Logout\SessionLogoutHandler; class SessionLogoutHandlerTest extends \PHPUnit_Framework_TestCase { - protected function setUp() - { - if (!class_exists('Symfony\Component\HttpFoundation\Request')) { - $this->markTestSkipped('The "HttpFoundation" component is not available'); - } - } - public function testLogout() { $handler = new SessionLogoutHandler(); diff --git a/Tests/Http/RememberMe/AbstractRememberMeServicesTest.php b/Tests/Http/RememberMe/AbstractRememberMeServicesTest.php index 67b415d..0f64730 100644 --- a/Tests/Http/RememberMe/AbstractRememberMeServicesTest.php +++ b/Tests/Http/RememberMe/AbstractRememberMeServicesTest.php @@ -17,13 +17,6 @@ use Symfony\Component\HttpFoundation\Response; class AbstractRememberMeServicesTest extends \PHPUnit_Framework_TestCase { - protected function setUp() - { - if (!class_exists('Symfony\Component\HttpFoundation\Request')) { - $this->markTestSkipped('The "HttpFoundation" component is not available'); - } - } - public function testGetRememberMeParameter() { $service = $this->getService(null, array('remember_me_parameter' => 'foo')); diff --git a/Tests/Http/RememberMe/PersistentTokenBasedRememberMeServicesTest.php b/Tests/Http/RememberMe/PersistentTokenBasedRememberMeServicesTest.php index d9593fc..19f6984 100644 --- a/Tests/Http/RememberMe/PersistentTokenBasedRememberMeServicesTest.php +++ b/Tests/Http/RememberMe/PersistentTokenBasedRememberMeServicesTest.php @@ -24,13 +24,6 @@ use Symfony\Component\Security\Core\Util\SecureRandom; class PersistentTokenBasedRememberMeServicesTest extends \PHPUnit_Framework_TestCase { - protected function setUp() - { - if (!class_exists('Symfony\Component\HttpFoundation\Request')) { - $this->markTestSkipped('The "HttpFoundation" component is not available'); - } - } - public function testAutoLoginReturnsNullWhenNoCookie() { $service = $this->getService(null, array('name' => 'foo')); diff --git a/Tests/Http/RememberMe/ResponseListenerTest.php b/Tests/Http/RememberMe/ResponseListenerTest.php index 011f38a..bca2c43 100644 --- a/Tests/Http/RememberMe/ResponseListenerTest.php +++ b/Tests/Http/RememberMe/ResponseListenerTest.php @@ -20,13 +20,6 @@ use Symfony\Component\HttpKernel\KernelEvents; class ResponseListenerTest extends \PHPUnit_Framework_TestCase { - protected function setUp() - { - if (!class_exists('Symfony\Component\HttpFoundation\Request')) { - $this->markTestSkipped('The "HttpFoundation" component is not available'); - } - } - public function testRememberMeCookieIsSentWithResponse() { $cookie = new Cookie('rememberme'); diff --git a/Tests/Http/RememberMe/TokenBasedRememberMeServicesTest.php b/Tests/Http/RememberMe/TokenBasedRememberMeServicesTest.php index c7dfa12..7947753 100644 --- a/Tests/Http/RememberMe/TokenBasedRememberMeServicesTest.php +++ b/Tests/Http/RememberMe/TokenBasedRememberMeServicesTest.php @@ -20,13 +20,6 @@ use Symfony\Component\Security\Http\RememberMe\TokenBasedRememberMeServices; class TokenBasedRememberMeServicesTest extends \PHPUnit_Framework_TestCase { - protected function setUp() - { - if (!class_exists('Symfony\Component\HttpFoundation\Request')) { - $this->markTestSkipped('The "HttpFoundation" component is not available'); - } - } - public function testAutoLoginReturnsNullWhenNoCookie() { $service = $this->getService(null, array('name' => 'foo')); diff --git a/Tests/Http/Session/SessionAuthenticationStrategyTest.php b/Tests/Http/Session/SessionAuthenticationStrategyTest.php index 431a002..d5055eb 100644 --- a/Tests/Http/Session/SessionAuthenticationStrategyTest.php +++ b/Tests/Http/Session/SessionAuthenticationStrategyTest.php @@ -15,13 +15,6 @@ use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategy; class SessionAuthenticationStrategyTest extends \PHPUnit_Framework_TestCase { - protected function setUp() - { - if (!class_exists('Symfony\Component\HttpFoundation\Request')) { - $this->markTestSkipped('The "HttpFoundation" component is not available'); - } - } - public function testSessionIsNotChanged() { $request = $this->getRequest(); diff --git a/composer.json b/composer.json index f253da5..15919a4 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ }, "require-dev": { "symfony/form": "~2.0,>=2.0.5", - "symfony/locale": "~2.0,>=2.0.5", + "symfony/intl": "~2.3", "symfony/routing": "~2.2", "symfony/validator": "~2.2", "doctrine/common": "~2.2", |