summaryrefslogtreecommitdiffstats
path: root/Tests/Http/Firewall
diff options
context:
space:
mode:
authorFabien Potencier <fabien.potencier@gmail.com>2013-08-19 22:44:13 +0200
committerFabien Potencier <fabien.potencier@gmail.com>2013-08-19 22:44:22 +0200
commit2defac09f53c04202772f442f0612d9664f9b185 (patch)
treeec646668a1474c464651231e94cb9e6d061284cd /Tests/Http/Firewall
parent3a63ed4527abf2fa9cc1a240cc2947d2317de182 (diff)
downloadsymfony-security-2defac09f53c04202772f442f0612d9664f9b185.zip
symfony-security-2defac09f53c04202772f442f0612d9664f9b185.tar.gz
symfony-security-2defac09f53c04202772f442f0612d9664f9b185.tar.bz2
removed deps checks in unit tests
As Composer is now widely used in the PHP world, having to run composer install before running the test suite is expected. This also has the nice benefit of removing a bunch of code, making things easier to maintain (there is only one place to declare a dev dependency), and probably more.
Diffstat (limited to 'Tests/Http/Firewall')
-rw-r--r--Tests/Http/Firewall/AbstractPreAuthenticatedListenerTest.php15
-rw-r--r--Tests/Http/Firewall/AccessListenerTest.php15
-rw-r--r--Tests/Http/Firewall/AnonymousAuthenticationListenerTest.php7
-rw-r--r--Tests/Http/Firewall/BasicAuthenticationListenerTest.php15
-rw-r--r--Tests/Http/Firewall/ChannelListenerTest.php15
-rw-r--r--Tests/Http/Firewall/ContextListenerTest.php12
-rw-r--r--Tests/Http/Firewall/LogoutListenerTest.php19
-rw-r--r--Tests/Http/Firewall/RememberMeListenerTest.php15
-rw-r--r--Tests/Http/Firewall/SwitchUserListenerTest.php8
-rw-r--r--Tests/Http/Firewall/X509AuthenticationListenerTest.php7
10 files changed, 0 insertions, 128 deletions
diff --git a/Tests/Http/Firewall/AbstractPreAuthenticatedListenerTest.php b/Tests/Http/Firewall/AbstractPreAuthenticatedListenerTest.php
index 76721ec..e57514b 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..0fd43ec 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');
diff --git a/Tests/Http/Firewall/BasicAuthenticationListenerTest.php b/Tests/Http/Firewall/BasicAuthenticationListenerTest.php
index 7616149..b523598 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 17bf0a0..2005a2b 100644
--- a/Tests/Http/Firewall/ChannelListenerTest.php
+++ b/Tests/Http/Firewall/ChannelListenerTest.php
@@ -17,21 +17,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 adef1bd..68af9a7 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 ba94b6e..2c26678 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 8ad4c55..922f99b 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 81ac0f7..77e5e6a 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
*/