Skip to content

Commit

Permalink
Merge branch '4.4'
Browse files Browse the repository at this point in the history
* 4.4:
  Remove use of ForwardCompatTrait
  Remove deprecated methods assertArraySubset
  • Loading branch information
nicolas-grekas committed Aug 3, 2019
2 parents eefd23c + 3a4a767 commit 84c3063
Show file tree
Hide file tree
Showing 14 changed files with 5 additions and 47 deletions.
3 changes: 0 additions & 3 deletions Tests/Annotation/RouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@
namespace Symfony\Component\Routing\Tests\Annotation;

use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Routing\Annotation\Route;

class RouteTest extends TestCase
{
use ForwardCompatTestTrait;

public function testInvalidRouteParameter()
{
$this->expectException('BadMethodCallException');
Expand Down
3 changes: 0 additions & 3 deletions Tests/Generator/UrlGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
namespace Symfony\Component\Routing\Tests\Generator;

use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Routing\Generator\UrlGenerator;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Routing\RequestContext;
Expand All @@ -21,8 +20,6 @@

class UrlGeneratorTest extends TestCase
{
use ForwardCompatTestTrait;

public function testAbsoluteUrlWithPort80()
{
$routes = $this->getRoutes('test', new Route('/testing'));
Expand Down
5 changes: 1 addition & 4 deletions Tests/Loader/AnnotationClassLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

use Doctrine\Common\Annotations\AnnotationReader;
use Doctrine\Common\Annotations\AnnotationRegistry;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Routing\Annotation\Route as RouteAnnotation;
use Symfony\Component\Routing\Loader\AnnotationClassLoader;
use Symfony\Component\Routing\Route;
Expand Down Expand Up @@ -41,14 +40,12 @@

class AnnotationClassLoaderTest extends AbstractAnnotationLoaderTest
{
use ForwardCompatTestTrait;

/**
* @var AnnotationClassLoader
*/
private $loader;

private function doSetUp()
protected function setUp()
{
$reader = new AnnotationReader();
$this->loader = new class($reader) extends AnnotationClassLoader {
Expand Down
5 changes: 1 addition & 4 deletions Tests/Loader/AnnotationDirectoryLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,15 @@

namespace Symfony\Component\Routing\Tests\Loader;

use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\Routing\Loader\AnnotationDirectoryLoader;

class AnnotationDirectoryLoaderTest extends AbstractAnnotationLoaderTest
{
use ForwardCompatTestTrait;

protected $loader;
protected $reader;

private function doSetUp()
protected function setUp()
{
parent::setUp();

Expand Down
5 changes: 1 addition & 4 deletions Tests/Loader/AnnotationFileLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,16 @@

namespace Symfony\Component\Routing\Tests\Loader;

use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Loader\AnnotationFileLoader;

class AnnotationFileLoaderTest extends AbstractAnnotationLoaderTest
{
use ForwardCompatTestTrait;

protected $loader;
protected $reader;

private function doSetUp()
protected function setUp()
{
parent::setUp();

Expand Down
5 changes: 1 addition & 4 deletions Tests/Loader/DirectoryLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

namespace Symfony\Component\Routing\Tests\Loader;

use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\Config\Loader\LoaderResolver;
use Symfony\Component\Routing\Loader\AnnotationFileLoader;
Expand All @@ -21,12 +20,10 @@

class DirectoryLoaderTest extends AbstractAnnotationLoaderTest
{
use ForwardCompatTestTrait;

private $loader;
private $reader;

private function doSetUp()
protected function setUp()
{
parent::setUp();

Expand Down
3 changes: 0 additions & 3 deletions Tests/Loader/XmlFileLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
namespace Symfony\Component\Routing\Tests\Loader;

use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\Config\Resource\FileResource;
use Symfony\Component\Routing\Loader\XmlFileLoader;
Expand All @@ -22,8 +21,6 @@

class XmlFileLoaderTest extends TestCase
{
use ForwardCompatTestTrait;

public function testSupports()
{
$loader = new XmlFileLoader($this->getMockBuilder('Symfony\Component\Config\FileLocator')->getMock());
Expand Down
3 changes: 0 additions & 3 deletions Tests/Loader/YamlFileLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
namespace Symfony\Component\Routing\Tests\Loader;

use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\Config\Resource\FileResource;
use Symfony\Component\Routing\Loader\YamlFileLoader;
Expand All @@ -21,8 +20,6 @@

class YamlFileLoaderTest extends TestCase
{
use ForwardCompatTestTrait;

public function testSupports()
{
$loader = new YamlFileLoader($this->getMockBuilder('Symfony\Component\Config\FileLocator')->getMock());
Expand Down
3 changes: 0 additions & 3 deletions Tests/Matcher/RedirectableUrlMatcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,12 @@

namespace Symfony\Component\Routing\Tests\Matcher;

use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Routing\RequestContext;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;

class RedirectableUrlMatcherTest extends UrlMatcherTest
{
use ForwardCompatTestTrait;

public function testMissingTrailingSlash()
{
$coll = new RouteCollection();
Expand Down
3 changes: 0 additions & 3 deletions Tests/Matcher/UrlMatcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
namespace Symfony\Component\Routing\Tests\Matcher;

use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
use Symfony\Component\Routing\Matcher\UrlMatcher;
Expand All @@ -22,8 +21,6 @@

class UrlMatcherTest extends TestCase
{
use ForwardCompatTestTrait;

public function testNoMethodSoAllowed()
{
$coll = new RouteCollection();
Expand Down
3 changes: 0 additions & 3 deletions Tests/RouteCollectionBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
namespace Symfony\Component\Routing\Tests;

use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\Config\Resource\FileResource;
use Symfony\Component\Routing\Loader\YamlFileLoader;
Expand All @@ -22,8 +21,6 @@

class RouteCollectionBuilderTest extends TestCase
{
use ForwardCompatTestTrait;

public function testImport()
{
$resolvedLoader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock();
Expand Down
3 changes: 0 additions & 3 deletions Tests/RouteCompilerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,11 @@
namespace Symfony\Component\Routing\Tests;

use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCompiler;

class RouteCompilerTest extends TestCase
{
use ForwardCompatTestTrait;

/**
* @dataProvider provideCompileData
*/
Expand Down
3 changes: 0 additions & 3 deletions Tests/RouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@
namespace Symfony\Component\Routing\Tests;

use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Routing\Route;

class RouteTest extends TestCase
{
use ForwardCompatTestTrait;

public function testConstructor()
{
$route = new Route('/{foo}', ['foo' => 'bar'], ['foo' => '\d+'], ['foo' => 'bar'], '{locale}.example.com');
Expand Down
5 changes: 1 addition & 4 deletions Tests/RouterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,17 @@
namespace Symfony\Component\Routing\Tests;

use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Routing\Router;

class RouterTest extends TestCase
{
use ForwardCompatTestTrait;

private $router = null;

private $loader = null;

private function doSetUp()
protected function setUp()
{
$this->loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock();
$this->router = new Router($this->loader, 'routing.yml');
Expand Down

0 comments on commit 84c3063

Please sign in to comment.