minor #32625 [FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion (janvt)
This PR was squashed before being merged into the 3.4 branch (closes #32625).
Discussion
----------
[FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion
FrameworkBundle & SecurityBundle each had 2 classes called WebTestCase,
one of which is only meant for internal tests. To avoid confusion the internal
class has been renamed to AbstractWebTestCase and made abstract.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no (or, yes, but internal class)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32577
| License | MIT
This PR is to ease integration, as not all test classes are present in all currently
maintained branches.
See https://github.com/symfony/symfony/pull/32617
Commits
-------
775d970927
[FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion
This commit is contained in:
commit
e45c7a3251
@ -12,10 +12,10 @@
|
|||||||
namespace Symfony\Bundle\FrameworkBundle\Tests;
|
namespace Symfony\Bundle\FrameworkBundle\Tests;
|
||||||
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Client;
|
use Symfony\Bundle\FrameworkBundle\Client;
|
||||||
use Symfony\Bundle\FrameworkBundle\Tests\Functional\WebTestCase;
|
use Symfony\Bundle\FrameworkBundle\Tests\Functional\AbstractWebTestCase;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
|
||||||
class ClientTest extends WebTestCase
|
class ClientTest extends AbstractWebTestCase
|
||||||
{
|
{
|
||||||
public function testRebootKernelBetweenRequests()
|
public function testRebootKernelBetweenRequests()
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
|
|||||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase;
|
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase;
|
||||||
use Symfony\Component\Filesystem\Filesystem;
|
use Symfony\Component\Filesystem\Filesystem;
|
||||||
|
|
||||||
class WebTestCase extends BaseWebTestCase
|
abstract class AbstractWebTestCase extends BaseWebTestCase
|
||||||
{
|
{
|
||||||
public static function assertRedirect($response, $location)
|
public static function assertRedirect($response, $location)
|
||||||
{
|
{
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
|
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
|
||||||
|
|
||||||
class AnnotatedControllerTest extends WebTestCase
|
class AnnotatedControllerTest extends AbstractWebTestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @dataProvider getRoutes
|
* @dataProvider getRoutes
|
||||||
|
@ -20,7 +20,7 @@ use Symfony\Component\EventDispatcher\EventDispatcher;
|
|||||||
use Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher;
|
use Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher;
|
||||||
use Symfony\Component\Templating\EngineInterface as ComponentEngineInterface;
|
use Symfony\Component\Templating\EngineInterface as ComponentEngineInterface;
|
||||||
|
|
||||||
class AutowiringTypesTest extends WebTestCase
|
class AutowiringTypesTest extends AbstractWebTestCase
|
||||||
{
|
{
|
||||||
public function testAnnotationReaderAutowiring()
|
public function testAnnotationReaderAutowiring()
|
||||||
{
|
{
|
||||||
|
@ -18,7 +18,7 @@ use Symfony\Component\Console\Tester\CommandTester;
|
|||||||
/**
|
/**
|
||||||
* @group functional
|
* @group functional
|
||||||
*/
|
*/
|
||||||
class CachePoolClearCommandTest extends WebTestCase
|
class CachePoolClearCommandTest extends AbstractWebTestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@ use Symfony\Component\Cache\Adapter\AdapterInterface;
|
|||||||
use Symfony\Component\Cache\Adapter\RedisAdapter;
|
use Symfony\Component\Cache\Adapter\RedisAdapter;
|
||||||
use Symfony\Component\Cache\Exception\InvalidArgumentException;
|
use Symfony\Component\Cache\Exception\InvalidArgumentException;
|
||||||
|
|
||||||
class CachePoolsTest extends WebTestCase
|
class CachePoolsTest extends AbstractWebTestCase
|
||||||
{
|
{
|
||||||
public function testCachePools()
|
public function testCachePools()
|
||||||
{
|
{
|
||||||
|
@ -19,7 +19,7 @@ use Symfony\Component\Console\Tester\CommandTester;
|
|||||||
/**
|
/**
|
||||||
* @group functional
|
* @group functional
|
||||||
*/
|
*/
|
||||||
class ConfigDebugCommandTest extends WebTestCase
|
class ConfigDebugCommandTest extends AbstractWebTestCase
|
||||||
{
|
{
|
||||||
private $application;
|
private $application;
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ use Symfony\Component\Console\Tester\CommandTester;
|
|||||||
/**
|
/**
|
||||||
* @group functional
|
* @group functional
|
||||||
*/
|
*/
|
||||||
class ConfigDumpReferenceCommandTest extends WebTestCase
|
class ConfigDumpReferenceCommandTest extends AbstractWebTestCase
|
||||||
{
|
{
|
||||||
private $application;
|
private $application;
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ use Symfony\Component\Console\Tester\ApplicationTester;
|
|||||||
/**
|
/**
|
||||||
* @group functional
|
* @group functional
|
||||||
*/
|
*/
|
||||||
class ContainerDebugCommandTest extends WebTestCase
|
class ContainerDebugCommandTest extends AbstractWebTestCase
|
||||||
{
|
{
|
||||||
public function testDumpContainerIfNotExists()
|
public function testDumpContainerIfNotExists()
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
|
|||||||
/**
|
/**
|
||||||
* Checks that the container compiles correctly when all the bundle features are enabled.
|
* Checks that the container compiles correctly when all the bundle features are enabled.
|
||||||
*/
|
*/
|
||||||
class ContainerDumpTest extends WebTestCase
|
class ContainerDumpTest extends AbstractWebTestCase
|
||||||
{
|
{
|
||||||
public function testContainerCompilationInDebug()
|
public function testContainerCompilationInDebug()
|
||||||
{
|
{
|
||||||
|
@ -17,7 +17,7 @@ use Symfony\Component\Console\Tester\ApplicationTester;
|
|||||||
/**
|
/**
|
||||||
* @group functional
|
* @group functional
|
||||||
*/
|
*/
|
||||||
class DebugAutowiringCommandTest extends WebTestCase
|
class DebugAutowiringCommandTest extends AbstractWebTestCase
|
||||||
{
|
{
|
||||||
public function testBasicFunctionality()
|
public function testBasicFunctionality()
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
|
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
|
||||||
|
|
||||||
class FragmentTest extends WebTestCase
|
class FragmentTest extends AbstractWebTestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @dataProvider getConfigs
|
* @dataProvider getConfigs
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
|
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
|
||||||
|
|
||||||
class ProfilerTest extends WebTestCase
|
class ProfilerTest extends AbstractWebTestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @dataProvider getConfigs
|
* @dataProvider getConfigs
|
||||||
|
@ -13,7 +13,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
|
|||||||
|
|
||||||
use Symfony\Component\PropertyInfo\Type;
|
use Symfony\Component\PropertyInfo\Type;
|
||||||
|
|
||||||
class PropertyInfoTest extends WebTestCase
|
class PropertyInfoTest extends AbstractWebTestCase
|
||||||
{
|
{
|
||||||
public function testPhpDocPriority()
|
public function testPhpDocPriority()
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
|
|||||||
/**
|
/**
|
||||||
* @author Kévin Dunglas <dunglas@gmail.com>
|
* @author Kévin Dunglas <dunglas@gmail.com>
|
||||||
*/
|
*/
|
||||||
class SerializerTest extends WebTestCase
|
class SerializerTest extends AbstractWebTestCase
|
||||||
{
|
{
|
||||||
public function testDeserializeArrayOfObject()
|
public function testDeserializeArrayOfObject()
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
|
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
|
||||||
|
|
||||||
class SessionTest extends WebTestCase
|
class SessionTest extends AbstractWebTestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Tests session attributes persist.
|
* Tests session attributes persist.
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
|
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
|
||||||
|
|
||||||
class SubRequestsTest extends WebTestCase
|
class SubRequestsTest extends AbstractWebTestCase
|
||||||
{
|
{
|
||||||
public function testStateAfterSubRequest()
|
public function testStateAfterSubRequest()
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,7 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
|
|||||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase;
|
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase;
|
||||||
use Symfony\Component\Filesystem\Filesystem;
|
use Symfony\Component\Filesystem\Filesystem;
|
||||||
|
|
||||||
class WebTestCase extends BaseWebTestCase
|
class AbstractWebTestCase extends BaseWebTestCase
|
||||||
{
|
{
|
||||||
public static function assertRedirect($response, $location)
|
public static function assertRedirect($response, $location)
|
||||||
{
|
{
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
|
namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
|
||||||
|
|
||||||
class AuthenticationCommencingTest extends WebTestCase
|
class AuthenticationCommencingTest extends AbstractWebTestCase
|
||||||
{
|
{
|
||||||
public function testAuthenticationIsCommencingIfAccessDeniedExceptionIsWrapped()
|
public function testAuthenticationIsCommencingIfAccessDeniedExceptionIsWrapped()
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,7 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
|
|||||||
use Symfony\Component\Security\Core\Authorization\AccessDecisionManager;
|
use Symfony\Component\Security\Core\Authorization\AccessDecisionManager;
|
||||||
use Symfony\Component\Security\Core\Authorization\TraceableAccessDecisionManager;
|
use Symfony\Component\Security\Core\Authorization\TraceableAccessDecisionManager;
|
||||||
|
|
||||||
class AutowiringTypesTest extends WebTestCase
|
class AutowiringTypesTest extends AbstractWebTestCase
|
||||||
{
|
{
|
||||||
public function testAccessDecisionManagerAutowiring()
|
public function testAccessDecisionManagerAutowiring()
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
|
namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
|
||||||
|
|
||||||
class CsrfFormLoginTest extends WebTestCase
|
class CsrfFormLoginTest extends AbstractWebTestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @dataProvider getConfigs
|
* @dataProvider getConfigs
|
||||||
|
@ -13,7 +13,7 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
|
|||||||
|
|
||||||
use Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\FirewallEntryPointBundle\Security\EntryPointStub;
|
use Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\FirewallEntryPointBundle\Security\EntryPointStub;
|
||||||
|
|
||||||
class FirewallEntryPointTest extends WebTestCase
|
class FirewallEntryPointTest extends AbstractWebTestCase
|
||||||
{
|
{
|
||||||
public function testItUsesTheConfiguredEntryPointWhenUsingUnknownCredentials()
|
public function testItUsesTheConfiguredEntryPointWhenUsingUnknownCredentials()
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
|
namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
|
||||||
|
|
||||||
class FormLoginTest extends WebTestCase
|
class FormLoginTest extends AbstractWebTestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @dataProvider getConfigs
|
* @dataProvider getConfigs
|
||||||
|
@ -16,7 +16,7 @@ use Symfony\Component\HttpFoundation\JsonResponse;
|
|||||||
/**
|
/**
|
||||||
* @author Kévin Dunglas <dunglas@gmail.com>
|
* @author Kévin Dunglas <dunglas@gmail.com>
|
||||||
*/
|
*/
|
||||||
class JsonLoginTest extends WebTestCase
|
class JsonLoginTest extends AbstractWebTestCase
|
||||||
{
|
{
|
||||||
public function testDefaultJsonLoginSuccess()
|
public function testDefaultJsonLoginSuccess()
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
|
namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
|
||||||
|
|
||||||
class LocalizedRoutesAsPathTest extends WebTestCase
|
class LocalizedRoutesAsPathTest extends AbstractWebTestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @dataProvider getLocales
|
* @dataProvider getLocales
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
|
namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
|
||||||
|
|
||||||
class LogoutTest extends WebTestCase
|
class LogoutTest extends AbstractWebTestCase
|
||||||
{
|
{
|
||||||
public function testSessionLessRememberMeLogout()
|
public function testSessionLessRememberMeLogout()
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
|
namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
|
||||||
|
|
||||||
class SecurityRoutingIntegrationTest extends WebTestCase
|
class SecurityRoutingIntegrationTest extends AbstractWebTestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @dataProvider getConfigs
|
* @dataProvider getConfigs
|
||||||
|
@ -14,7 +14,7 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
|
|||||||
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
|
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
|
||||||
use Symfony\Component\Security\Core\User\User;
|
use Symfony\Component\Security\Core\User\User;
|
||||||
|
|
||||||
class SecurityTest extends WebTestCase
|
class SecurityTest extends AbstractWebTestCase
|
||||||
{
|
{
|
||||||
public function testServiceIsFunctional()
|
public function testServiceIsFunctional()
|
||||||
{
|
{
|
||||||
|
@ -35,7 +35,7 @@ use Symfony\Component\Security\Acl\Permission\BasicPermissionMap;
|
|||||||
* @requires extension pdo_sqlite
|
* @requires extension pdo_sqlite
|
||||||
* @group legacy
|
* @group legacy
|
||||||
*/
|
*/
|
||||||
class SetAclCommandTest extends WebTestCase
|
class SetAclCommandTest extends AbstractWebTestCase
|
||||||
{
|
{
|
||||||
const OBJECT_CLASS = 'Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\AclBundle\Entity\Car';
|
const OBJECT_CLASS = 'Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\AclBundle\Entity\Car';
|
||||||
const SECURITY_CLASS = 'Symfony\Component\Security\Core\User\User';
|
const SECURITY_CLASS = 'Symfony\Component\Security\Core\User\User';
|
||||||
|
@ -14,7 +14,7 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
|
|||||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||||
use Symfony\Component\Security\Http\Firewall\SwitchUserListener;
|
use Symfony\Component\Security\Http\Firewall\SwitchUserListener;
|
||||||
|
|
||||||
class SwitchUserTest extends WebTestCase
|
class SwitchUserTest extends AbstractWebTestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @dataProvider getTestParameters
|
* @dataProvider getTestParameters
|
||||||
|
@ -25,7 +25,7 @@ use Symfony\Component\Security\Core\Encoder\Pbkdf2PasswordEncoder;
|
|||||||
*
|
*
|
||||||
* @author Sarah Khalil <mkhalil.sarah@gmail.com>
|
* @author Sarah Khalil <mkhalil.sarah@gmail.com>
|
||||||
*/
|
*/
|
||||||
class UserPasswordEncoderCommandTest extends WebTestCase
|
class UserPasswordEncoderCommandTest extends AbstractWebTestCase
|
||||||
{
|
{
|
||||||
/** @var CommandTester */
|
/** @var CommandTester */
|
||||||
private $passwordEncoderCommandTester;
|
private $passwordEncoderCommandTester;
|
||||||
|
Reference in New Issue
Block a user