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
@@ -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())