Merge branch '4.3' into 4.4

* 4.3:
  fix tests
This commit is contained in:
Nicolas Grekas 2020-01-09 13:48:51 +01:00
commit 29f5b180d9
3 changed files with 15 additions and 13 deletions

View File

@ -141,7 +141,9 @@ if (!file_exists("$PHPUNIT_DIR/$PHPUNIT_VERSION_DIR/phpunit") || $configurationH
$passthruOrFail("$COMPOSER require --no-update phpunit/phpunit-mock-objects \"~3.1.0\"");
}
$passthruOrFail("$COMPOSER config --unset platform");
if (PHP_VERSION_ID >= 70000) {
$passthruOrFail("$COMPOSER config --unset platform");
}
if (file_exists($path = $root.'/vendor/symfony/phpunit-bridge')) {
$passthruOrFail("$COMPOSER require --no-update symfony/phpunit-bridge \"*@dev\"");
$passthruOrFail("$COMPOSER config repositories.phpunit-bridge path ".escapeshellarg(str_replace('/', DIRECTORY_SEPARATOR, $path)));

View File

@ -11,7 +11,7 @@
namespace Symfony\Bundle\WebProfilerBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Client;
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Bundle\WebProfilerBundle\Controller\ProfilerController;
use Symfony\Bundle\WebProfilerBundle\Csp\ContentSecurityPolicyHandler;
@ -45,7 +45,7 @@ class ProfilerControllerTest extends WebTestCase
public function testHomeActionRedirect()
{
$kernel = new WebProfilerBundleKernel();
$client = new Client($kernel);
$client = new KernelBrowser($kernel);
$client->request('GET', '/_profiler/');
@ -56,7 +56,7 @@ class ProfilerControllerTest extends WebTestCase
public function testPanelActionWithLatestTokenWhenNoTokensExist()
{
$kernel = new WebProfilerBundleKernel();
$client = new Client($kernel);
$client = new KernelBrowser($kernel);
$client->request('GET', '/_profiler/latest');
@ -66,7 +66,7 @@ class ProfilerControllerTest extends WebTestCase
public function testPanelActionWithLatestToken()
{
$kernel = new WebProfilerBundleKernel();
$client = new Client($kernel);
$client = new KernelBrowser($kernel);
$client->request('GET', '/');
$client->request('GET', '/_profiler/latest');
@ -77,7 +77,7 @@ class ProfilerControllerTest extends WebTestCase
public function testPanelActionWithoutValidToken()
{
$kernel = new WebProfilerBundleKernel();
$client = new Client($kernel);
$client = new KernelBrowser($kernel);
$client->request('GET', '/_profiler/this-token-does-not-exist');
@ -87,7 +87,7 @@ class ProfilerControllerTest extends WebTestCase
public function testPanelActionWithWrongPanel()
{
$kernel = new WebProfilerBundleKernel();
$client = new Client($kernel);
$client = new KernelBrowser($kernel);
$client->request('GET', '/');
$client->request('GET', '/_profiler/latest?panel=this-panel-does-not-exist');
@ -98,7 +98,7 @@ class ProfilerControllerTest extends WebTestCase
public function testPanelActionWithValidPanelAndToken()
{
$kernel = new WebProfilerBundleKernel();
$client = new Client($kernel);
$client = new KernelBrowser($kernel);
$client->request('GET', '/');
$crawler = $client->request('GET', '/_profiler/latest?panel=router');
@ -224,7 +224,7 @@ class ProfilerControllerTest extends WebTestCase
public function testSearchBarActionDefaultPage()
{
$kernel = new WebProfilerBundleKernel();
$client = new Client($kernel);
$client = new KernelBrowser($kernel);
$crawler = $client->request('GET', '/_profiler/search_bar');
@ -316,7 +316,7 @@ class ProfilerControllerTest extends WebTestCase
public function testSearchActionWithToken()
{
$kernel = new WebProfilerBundleKernel();
$client = new Client($kernel);
$client = new KernelBrowser($kernel);
$client->request('GET', '/');
$token = $client->getResponse()->headers->get('x-debug-token');
@ -329,7 +329,7 @@ class ProfilerControllerTest extends WebTestCase
public function testSearchActionWithoutToken()
{
$kernel = new WebProfilerBundleKernel();
$client = new Client($kernel);
$client = new KernelBrowser($kernel);
$client->followRedirects();
$client->request('GET', '/');
@ -355,7 +355,7 @@ class ProfilerControllerTest extends WebTestCase
public function testPhpinfoAction()
{
$kernel = new WebProfilerBundleKernel();
$client = new Client($kernel);
$client = new KernelBrowser($kernel);
$client->request('GET', '/_profiler/phpinfo');

View File

@ -66,7 +66,7 @@ class CacheDataCollector extends DataCollector implements LateDataCollectorInter
public function lateCollect()
{
$this->data = $this->cloneVar($this->data);
$this->data['instances']['calls'] = $this->cloneVar($this->data['instances']['calls']);
}
/**