Skip to content

Commit

Permalink
minor #32625 [FrameworkBundle] [SecurityBundle] Rename internal WebTe…
Browse files Browse the repository at this point in the history
…stCase 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 #32617

Commits
-------

775d970 [FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion
  • Loading branch information
nicolas-grekas committed Jul 23, 2019
2 parents 90acd03 + 775d970 commit e45c7a3
Show file tree
Hide file tree
Showing 31 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions src/Symfony/Bundle/FrameworkBundle/Tests/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
namespace Symfony\Bundle\FrameworkBundle\Tests;

use Symfony\Bundle\FrameworkBundle\Client;
use Symfony\Bundle\FrameworkBundle\Tests\Functional\WebTestCase;
use Symfony\Bundle\FrameworkBundle\Tests\Functional\AbstractWebTestCase;
use Symfony\Component\HttpFoundation\Response;

class ClientTest extends WebTestCase
class ClientTest extends AbstractWebTestCase
{
public function testRebootKernelBetweenRequests()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase;
use Symfony\Component\Filesystem\Filesystem;

class WebTestCase extends BaseWebTestCase
abstract class AbstractWebTestCase extends BaseWebTestCase
{
public static function assertRedirect($response, $location)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;

class AnnotatedControllerTest extends WebTestCase
class AnnotatedControllerTest extends AbstractWebTestCase
{
/**
* @dataProvider getRoutes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
use Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher;
use Symfony\Component\Templating\EngineInterface as ComponentEngineInterface;

class AutowiringTypesTest extends WebTestCase
class AutowiringTypesTest extends AbstractWebTestCase
{
public function testAnnotationReaderAutowiring()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/**
* @group functional
*/
class CachePoolClearCommandTest extends WebTestCase
class CachePoolClearCommandTest extends AbstractWebTestCase
{
protected function setUp()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use Symfony\Component\Cache\Adapter\RedisAdapter;
use Symfony\Component\Cache\Exception\InvalidArgumentException;

class CachePoolsTest extends WebTestCase
class CachePoolsTest extends AbstractWebTestCase
{
public function testCachePools()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* @group functional
*/
class ConfigDebugCommandTest extends WebTestCase
class ConfigDebugCommandTest extends AbstractWebTestCase
{
private $application;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* @group functional
*/
class ConfigDumpReferenceCommandTest extends WebTestCase
class ConfigDumpReferenceCommandTest extends AbstractWebTestCase
{
private $application;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/**
* @group functional
*/
class ContainerDebugCommandTest extends WebTestCase
class ContainerDebugCommandTest extends AbstractWebTestCase
{
public function testDumpContainerIfNotExists()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* Checks that the container compiles correctly when all the bundle features are enabled.
*/
class ContainerDumpTest extends WebTestCase
class ContainerDumpTest extends AbstractWebTestCase
{
public function testContainerCompilationInDebug()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/**
* @group functional
*/
class DebugAutowiringCommandTest extends WebTestCase
class DebugAutowiringCommandTest extends AbstractWebTestCase
{
public function testBasicFunctionality()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;

class FragmentTest extends WebTestCase
class FragmentTest extends AbstractWebTestCase
{
/**
* @dataProvider getConfigs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;

class ProfilerTest extends WebTestCase
class ProfilerTest extends AbstractWebTestCase
{
/**
* @dataProvider getConfigs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

use Symfony\Component\PropertyInfo\Type;

class PropertyInfoTest extends WebTestCase
class PropertyInfoTest extends AbstractWebTestCase
{
public function testPhpDocPriority()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* @author Kévin Dunglas <dunglas@gmail.com>
*/
class SerializerTest extends WebTestCase
class SerializerTest extends AbstractWebTestCase
{
public function testDeserializeArrayOfObject()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;

class SessionTest extends WebTestCase
class SessionTest extends AbstractWebTestCase
{
/**
* Tests session attributes persist.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;

class SubRequestsTest extends WebTestCase
class SubRequestsTest extends AbstractWebTestCase
{
public function testStateAfterSubRequest()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase;
use Symfony\Component\Filesystem\Filesystem;

class WebTestCase extends BaseWebTestCase
class AbstractWebTestCase extends BaseWebTestCase
{
public static function assertRedirect($response, $location)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Symfony\Bundle\SecurityBundle\Tests\Functional;

class AuthenticationCommencingTest extends WebTestCase
class AuthenticationCommencingTest extends AbstractWebTestCase
{
public function testAuthenticationIsCommencingIfAccessDeniedExceptionIsWrapped()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Symfony\Component\Security\Core\Authorization\AccessDecisionManager;
use Symfony\Component\Security\Core\Authorization\TraceableAccessDecisionManager;

class AutowiringTypesTest extends WebTestCase
class AutowiringTypesTest extends AbstractWebTestCase
{
public function testAccessDecisionManagerAutowiring()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Symfony\Bundle\SecurityBundle\Tests\Functional;

class CsrfFormLoginTest extends WebTestCase
class CsrfFormLoginTest extends AbstractWebTestCase
{
/**
* @dataProvider getConfigs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

use Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\FirewallEntryPointBundle\Security\EntryPointStub;

class FirewallEntryPointTest extends WebTestCase
class FirewallEntryPointTest extends AbstractWebTestCase
{
public function testItUsesTheConfiguredEntryPointWhenUsingUnknownCredentials()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Symfony\Bundle\SecurityBundle\Tests\Functional;

class FormLoginTest extends WebTestCase
class FormLoginTest extends AbstractWebTestCase
{
/**
* @dataProvider getConfigs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* @author Kévin Dunglas <dunglas@gmail.com>
*/
class JsonLoginTest extends WebTestCase
class JsonLoginTest extends AbstractWebTestCase
{
public function testDefaultJsonLoginSuccess()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Symfony\Bundle\SecurityBundle\Tests\Functional;

class LocalizedRoutesAsPathTest extends WebTestCase
class LocalizedRoutesAsPathTest extends AbstractWebTestCase
{
/**
* @dataProvider getLocales
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Symfony\Bundle\SecurityBundle\Tests\Functional;

class LogoutTest extends WebTestCase
class LogoutTest extends AbstractWebTestCase
{
public function testSessionLessRememberMeLogout()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Symfony\Bundle\SecurityBundle\Tests\Functional;

class SecurityRoutingIntegrationTest extends WebTestCase
class SecurityRoutingIntegrationTest extends AbstractWebTestCase
{
/**
* @dataProvider getConfigs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use Symfony\Component\Security\Core\User\User;

class SecurityTest extends WebTestCase
class SecurityTest extends AbstractWebTestCase
{
public function testServiceIsFunctional()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* @requires extension pdo_sqlite
* @group legacy
*/
class SetAclCommandTest extends WebTestCase
class SetAclCommandTest extends AbstractWebTestCase
{
const OBJECT_CLASS = 'Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\AclBundle\Entity\Car';
const SECURITY_CLASS = 'Symfony\Component\Security\Core\User\User';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Security\Http\Firewall\SwitchUserListener;

class SwitchUserTest extends WebTestCase
class SwitchUserTest extends AbstractWebTestCase
{
/**
* @dataProvider getTestParameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* @author Sarah Khalil <mkhalil.sarah@gmail.com>
*/
class UserPasswordEncoderCommandTest extends WebTestCase
class UserPasswordEncoderCommandTest extends AbstractWebTestCase
{
/** @var CommandTester */
private $passwordEncoderCommandTester;
Expand Down

0 comments on commit e45c7a3

Please sign in to comment.