Upgrade 1-11.38

This commit is contained in:
xesmyd
2026-03-30 14:10:30 +02:00
parent f2a7e6d1fc
commit ac648ef29d
24665 changed files with 69682 additions and 2205004 deletions
@@ -2,11 +2,12 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Routing;
use PHPUnit\Framework\TestCase;
use Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser;
use Symfony\Bundle\FrameworkBundle\Routing\DelegatingLoader;
use Symfony\Component\Config\Loader\LoaderResolver;
class DelegatingLoaderTest extends \PHPUnit_Framework_TestCase
class DelegatingLoaderTest extends TestCase
{
public function testConstructorApi()
{
@@ -11,12 +11,13 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Routing;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;
use Symfony\Bundle\FrameworkBundle\Routing\RedirectableUrlMatcher;
use Symfony\Component\Routing\RequestContext;
class RedirectableUrlMatcherTest extends \PHPUnit_Framework_TestCase
class RedirectableUrlMatcherTest extends TestCase
{
public function testRedirectWhenNoSlash()
{
@@ -24,6 +25,10 @@ class RedirectableUrlMatcherTest extends \PHPUnit_Framework_TestCase
$coll->add('foo', new Route('/foo/'));
$matcher = new RedirectableUrlMatcher($coll, $context = new RequestContext());
$parameters = $matcher->match('/foo');
if ('foo' === $parameters['_route']) {
$parameters['_route'] = null; // FC with behavior on 3.4
}
$this->assertEquals(array(
'_controller' => 'Symfony\Bundle\FrameworkBundle\Controller\RedirectController::urlRedirectAction',
@@ -34,7 +39,7 @@ class RedirectableUrlMatcherTest extends \PHPUnit_Framework_TestCase
'httpsPort' => $context->getHttpsPort(),
'_route' => null,
),
$matcher->match('/foo')
$parameters
);
}
@@ -11,11 +11,12 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Routing;
use PHPUnit\Framework\TestCase;
use Symfony\Bundle\FrameworkBundle\Routing\Router;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;
class RouterTest extends \PHPUnit_Framework_TestCase
class RouterTest extends TestCase
{
public function testGenerateWithServiceParam()
{
@@ -131,6 +132,20 @@ class RouterTest extends \PHPUnit_Framework_TestCase
);
}
/**
* @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException
* @expectedExceptionMessage Using "%env(FOO)%" is not allowed in routing configuration.
*/
public function testEnvPlaceholders()
{
$routes = new RouteCollection();
$routes->add('foo', new Route('/%env(FOO)%'));
$router = new Router($this->getServiceContainer($routes), 'foo');
$router->getRouteCollection();
}
public function testHostPlaceholders()
{
$routes = new RouteCollection();
@@ -214,7 +229,7 @@ class RouterTest extends \PHPUnit_Framework_TestCase
*/
private function getServiceContainer(RouteCollection $routes)
{
$loader = $this->getMock('Symfony\Component\Config\Loader\LoaderInterface');
$loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock();
$loader
->expects($this->any())
@@ -222,7 +237,7 @@ class RouterTest extends \PHPUnit_Framework_TestCase
->will($this->returnValue($routes))
;
$sc = $this->getMock('Symfony\\Component\\DependencyInjection\\Container', array('get'));
$sc = $this->getMockBuilder('Symfony\\Component\\DependencyInjection\\Container')->setMethods(array('get'))->getMock();
$sc
->expects($this->once())