Files
iTop/lib/symfony/framework-bundle/Tests/Functional/SubRequestsTest.php
Pierre Goiffon ad821e7d9c N°2651 rollback gitignore for lib tests dirs
Too dangerous ! We'll work properly on this but for 2.8
2020-01-10 15:23:15 +01:00

32 lines
1.0 KiB
PHP

<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
class SubRequestsTest extends AbstractWebTestCase
{
public function testStateAfterSubRequest()
{
$client = $this->createClient(['test_case' => 'Session', 'root_config' => 'config.yml']);
$client->request('GET', 'https://localhost/subrequest/en');
$this->assertEquals('--fr/json--en/html--fr/json--http://localhost/subrequest/fragment/en', $client->getResponse()->getContent());
}
public function testSubRequestControllerServicesAreResolved()
{
$client = $this->createClient(['test_case' => 'ControllerServiceResolution', 'root_config' => 'config.yml']);
$client->request('GET', 'https://localhost/subrequest');
$this->assertEquals('---', $client->getResponse()->getContent());
}
}