Skip to content

Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase #404

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/Unit/CacheManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
use FOS\HttpCache\ProxyClient\Invalidation\RefreshCapable;
use FOS\HttpCache\ProxyClient\ProxyClient;
use FOS\HttpCacheBundle\CacheManager;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;

class CacheManagerTest extends \PHPUnit_Framework_TestCase
class CacheManagerTest extends TestCase
{
protected $proxyClient;

Expand Down
3 changes: 2 additions & 1 deletion tests/Unit/Command/BaseInvalidateCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@

use FOS\HttpCacheBundle\CacheManager;
use FOS\HttpCacheBundle\Command\InvalidatePathCommand;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Tester\CommandTester;
use Symfony\Component\DependencyInjection\ContainerInterface;

class BaseInvalidateCommandTest extends \PHPUnit_Framework_TestCase
class BaseInvalidateCommandTest extends TestCase
{
public function testContainerAccess()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Unit/Command/InvalidatePathCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@

use FOS\HttpCacheBundle\CacheManager;
use FOS\HttpCacheBundle\Command\InvalidatePathCommand;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Tester\CommandTester;

class InvalidatePathCommandTest extends \PHPUnit_Framework_TestCase
class InvalidatePathCommandTest extends TestCase
{
/**
* @expectedException \RuntimeException
Expand Down
3 changes: 2 additions & 1 deletion tests/Unit/Command/InvalidateRegexCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@

use FOS\HttpCacheBundle\CacheManager;
use FOS\HttpCacheBundle\Command\InvalidateRegexCommand;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Tester\CommandTester;

class InvalidateRegexCommandTest extends \PHPUnit_Framework_TestCase
class InvalidateRegexCommandTest extends TestCase
{
/**
* @expectedException \RuntimeException
Expand Down
3 changes: 2 additions & 1 deletion tests/Unit/Command/InvalidateTagCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@

use FOS\HttpCacheBundle\CacheManager;
use FOS\HttpCacheBundle\Command\InvalidateTagCommand;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Tester\CommandTester;

class InvalidateTagCommandTest extends \PHPUnit_Framework_TestCase
class InvalidateTagCommandTest extends TestCase
{
/**
* @expectedException \RuntimeException
Expand Down
3 changes: 2 additions & 1 deletion tests/Unit/Command/PathSanityCheckTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
namespace FOS\HttpCacheBundle\Tests\Unit\Command;

use FOS\HttpCacheBundle\Command\PathSanityCheck;
use PHPUnit\Framework\TestCase;

class PathSanityCheckTest extends \PHPUnit_Framework_TestCase
class PathSanityCheckTest extends TestCase
{
public function pathProvider()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Unit/Command/RefreshPathCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@

use FOS\HttpCacheBundle\CacheManager;
use FOS\HttpCacheBundle\Command\RefreshPathCommand;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Tester\CommandTester;

class RefreshPathCommandTest extends \PHPUnit_Framework_TestCase
class RefreshPathCommandTest extends TestCase
{
/**
* @expectedException \RuntimeException
Expand Down
3 changes: 2 additions & 1 deletion tests/Unit/Configuration/InvalidateRouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
namespace FOS\HttpCacheBundle\Tests\Unit\Configuration;

use FOS\HttpCacheBundle\Configuration\InvalidateRoute;
use PHPUnit\Framework\TestCase;

/**
* Test the @InvalidateRoute annotation.
*/
class InvalidateRouteTest extends \PHPUnit_Framework_TestCase
class InvalidateRouteTest extends TestCase
{
/**
* @expectedException \RuntimeException
Expand Down
3 changes: 2 additions & 1 deletion tests/Unit/Configuration/TagTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
namespace FOS\HttpCacheBundle\Tests\Unit\Configuration;

use FOS\HttpCacheBundle\Configuration\Tag;
use PHPUnit\Framework\TestCase;

/**
* Test the @InvalidateRoute annotation.
*/
class TagTest extends \PHPUnit_Framework_TestCase
class TagTest extends TestCase
{
/**
* @expectedException \FOS\HttpCacheBundle\Exception\InvalidTagException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@

use FOS\HttpCacheBundle\DependencyInjection\Compiler\HashGeneratorPass;
use FOS\HttpCacheBundle\DependencyInjection\FOSHttpCacheExtension;
use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;

class HashGeneratorPassTest extends \PHPUnit_Framework_TestCase
class HashGeneratorPassTest extends TestCase
{
/**
* @var FOSHttpCacheExtension
Expand Down
3 changes: 2 additions & 1 deletion tests/Unit/DependencyInjection/Compiler/LoggerPassTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@

use FOS\HttpCacheBundle\DependencyInjection\Compiler\LoggerPass;
use FOS\HttpCacheBundle\DependencyInjection\FOSHttpCacheExtension;
use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;

class LoggerPassTest extends \PHPUnit_Framework_TestCase
class LoggerPassTest extends TestCase
{
public function testLogger()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@

use FOS\HttpCacheBundle\DependencyInjection\Compiler\TagListenerPass;
use FOS\HttpCacheBundle\DependencyInjection\FOSHttpCacheExtension;
use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;

class TagListenerPassTest extends \PHPUnit_Framework_TestCase
class TagListenerPassTest extends TestCase
{
/**
* @expectedException \RuntimeException
Expand Down
3 changes: 2 additions & 1 deletion tests/Unit/DependencyInjection/FOSHttpCacheExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
namespace FOS\HttpCacheBundle\Tests\Unit\DependencyInjection;

use FOS\HttpCacheBundle\DependencyInjection\FOSHttpCacheExtension;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
Expand All @@ -21,7 +22,7 @@
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\Routing\Router;

class FOSHttpCacheExtensionTest extends \PHPUnit_Framework_TestCase
class FOSHttpCacheExtensionTest extends TestCase
{
/**
* @var FOSHttpCacheExtension
Expand Down
3 changes: 2 additions & 1 deletion tests/Unit/EventListener/CacheControlListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@

use FOS\HttpCacheBundle\EventListener\CacheControlListener;
use FOS\HttpCacheBundle\Http\RuleMatcherInterface;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\HttpKernelInterface;

class CacheControlListenerTest extends \PHPUnit_Framework_TestCase
class CacheControlListenerTest extends TestCase
{
public function testDefaultHeaders()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Unit/EventListener/InvalidationListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use FOS\HttpCacheBundle\EventListener\InvalidationListener;
use FOS\HttpCacheBundle\Http\RuleMatcherInterface;
use Mockery\MockInterface;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Event\ConsoleEvent;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\HttpFoundation\Request;
Expand All @@ -28,7 +29,7 @@
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;

class InvalidationListenerTest extends \PHPUnit_Framework_TestCase
class InvalidationListenerTest extends TestCase
{
/**
* @var CacheManager|MockInterface
Expand Down
3 changes: 2 additions & 1 deletion tests/Unit/EventListener/TagListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@
use FOS\HttpCacheBundle\EventListener\TagListener;
use FOS\HttpCacheBundle\Http\RuleMatcherInterface;
use FOS\HttpCacheBundle\Http\SymfonyResponseTagger;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestMatcherInterface;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\HttpKernelInterface;

class TagListenerTest extends \PHPUnit_Framework_TestCase
class TagListenerTest extends TestCase
{
/**
* @var CacheManager|\Mockery\Mock
Expand Down
3 changes: 2 additions & 1 deletion tests/Unit/EventListener/UserContextListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@

use FOS\HttpCache\UserContext\HashGenerator;
use FOS\HttpCacheBundle\EventListener\UserContextListener;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestMatcherInterface;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\HttpKernelInterface;

class UserContextListenerTest extends \PHPUnit_Framework_TestCase
class UserContextListenerTest extends TestCase
{
/**
* @expectedException \InvalidArgumentException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
namespace FOS\HttpCacheBundle\Tests\Unit\Http\RequestMatcher;

use FOS\HttpCacheBundle\Http\RequestMatcher\QuerystringRequestMatcher;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Request;

class QuerystringRequestMatcherTest extends \PHPUnit_Framework_TestCase
class QuerystringRequestMatcherTest extends TestCase
{
public function testMatchesReturnsFalseIfParentCallFails()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Unit/Http/RuleMatcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@

use FOS\HttpCacheBundle\Http\ResponseMatcher\CacheableResponseMatcher;
use FOS\HttpCacheBundle\Http\RuleMatcher;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestMatcher;
use Symfony\Component\HttpFoundation\Response;

class RuleMatcherTest extends \PHPUnit_Framework_TestCase
class RuleMatcherTest extends TestCase
{
public function testRequestMatcherCalled()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Unit/Http/SymfonyResponseTaggerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@

use FOS\HttpCache\ProxyClient\ProxyClient;
use FOS\HttpCacheBundle\Http\SymfonyResponseTagger;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Response;

class SymfonyResponseTaggerTest extends \PHPUnit_Framework_TestCase
class SymfonyResponseTaggerTest extends TestCase
{
private $proxyClient;

Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/UserContext/AnonymousRequestMatcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
namespace FOS\HttpCacheBundle\Tests\Unit\UserContext;

use FOS\HttpCacheBundle\UserContext\AnonymousRequestMatcher;
use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Request;

class AnonymousRequestMatcherTest extends PHPUnit_Framework_TestCase
class AnonymousRequestMatcherTest extends TestCase
{
public function testMatchAnonymousRequest()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Unit/UserContext/RequestMatcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
namespace FOS\HttpCacheBundle\Tests\Unit\UserContext;

use FOS\HttpCacheBundle\UserContext\RequestMatcher;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Request;

class RequestMatcherTest extends \PHPUnit_Framework_TestCase
class RequestMatcherTest extends TestCase
{
public function testMatch()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Unit/UserContext/RoleProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@

use FOS\HttpCache\UserContext\UserContext;
use FOS\HttpCacheBundle\UserContext\RoleProvider;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Role\Role;

class RoleProviderTest extends \PHPUnit_Framework_TestCase
class RoleProviderTest extends TestCase
{
public function testProvider()
{
Expand Down