Merge branch '4.3' into 4.4
* 4.3: fix tests
This commit is contained in:
commit
29f5b180d9
@ -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 require --no-update phpunit/phpunit-mock-objects \"~3.1.0\"");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (PHP_VERSION_ID >= 70000) {
|
||||||
$passthruOrFail("$COMPOSER config --unset platform");
|
$passthruOrFail("$COMPOSER config --unset platform");
|
||||||
|
}
|
||||||
if (file_exists($path = $root.'/vendor/symfony/phpunit-bridge')) {
|
if (file_exists($path = $root.'/vendor/symfony/phpunit-bridge')) {
|
||||||
$passthruOrFail("$COMPOSER require --no-update symfony/phpunit-bridge \"*@dev\"");
|
$passthruOrFail("$COMPOSER require --no-update symfony/phpunit-bridge \"*@dev\"");
|
||||||
$passthruOrFail("$COMPOSER config repositories.phpunit-bridge path ".escapeshellarg(str_replace('/', DIRECTORY_SEPARATOR, $path)));
|
$passthruOrFail("$COMPOSER config repositories.phpunit-bridge path ".escapeshellarg(str_replace('/', DIRECTORY_SEPARATOR, $path)));
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
namespace Symfony\Bundle\WebProfilerBundle\Tests\Controller;
|
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\FrameworkBundle\Test\WebTestCase;
|
||||||
use Symfony\Bundle\WebProfilerBundle\Controller\ProfilerController;
|
use Symfony\Bundle\WebProfilerBundle\Controller\ProfilerController;
|
||||||
use Symfony\Bundle\WebProfilerBundle\Csp\ContentSecurityPolicyHandler;
|
use Symfony\Bundle\WebProfilerBundle\Csp\ContentSecurityPolicyHandler;
|
||||||
@ -45,7 +45,7 @@ class ProfilerControllerTest extends WebTestCase
|
|||||||
public function testHomeActionRedirect()
|
public function testHomeActionRedirect()
|
||||||
{
|
{
|
||||||
$kernel = new WebProfilerBundleKernel();
|
$kernel = new WebProfilerBundleKernel();
|
||||||
$client = new Client($kernel);
|
$client = new KernelBrowser($kernel);
|
||||||
|
|
||||||
$client->request('GET', '/_profiler/');
|
$client->request('GET', '/_profiler/');
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ class ProfilerControllerTest extends WebTestCase
|
|||||||
public function testPanelActionWithLatestTokenWhenNoTokensExist()
|
public function testPanelActionWithLatestTokenWhenNoTokensExist()
|
||||||
{
|
{
|
||||||
$kernel = new WebProfilerBundleKernel();
|
$kernel = new WebProfilerBundleKernel();
|
||||||
$client = new Client($kernel);
|
$client = new KernelBrowser($kernel);
|
||||||
|
|
||||||
$client->request('GET', '/_profiler/latest');
|
$client->request('GET', '/_profiler/latest');
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ class ProfilerControllerTest extends WebTestCase
|
|||||||
public function testPanelActionWithLatestToken()
|
public function testPanelActionWithLatestToken()
|
||||||
{
|
{
|
||||||
$kernel = new WebProfilerBundleKernel();
|
$kernel = new WebProfilerBundleKernel();
|
||||||
$client = new Client($kernel);
|
$client = new KernelBrowser($kernel);
|
||||||
|
|
||||||
$client->request('GET', '/');
|
$client->request('GET', '/');
|
||||||
$client->request('GET', '/_profiler/latest');
|
$client->request('GET', '/_profiler/latest');
|
||||||
@ -77,7 +77,7 @@ class ProfilerControllerTest extends WebTestCase
|
|||||||
public function testPanelActionWithoutValidToken()
|
public function testPanelActionWithoutValidToken()
|
||||||
{
|
{
|
||||||
$kernel = new WebProfilerBundleKernel();
|
$kernel = new WebProfilerBundleKernel();
|
||||||
$client = new Client($kernel);
|
$client = new KernelBrowser($kernel);
|
||||||
|
|
||||||
$client->request('GET', '/_profiler/this-token-does-not-exist');
|
$client->request('GET', '/_profiler/this-token-does-not-exist');
|
||||||
|
|
||||||
@ -87,7 +87,7 @@ class ProfilerControllerTest extends WebTestCase
|
|||||||
public function testPanelActionWithWrongPanel()
|
public function testPanelActionWithWrongPanel()
|
||||||
{
|
{
|
||||||
$kernel = new WebProfilerBundleKernel();
|
$kernel = new WebProfilerBundleKernel();
|
||||||
$client = new Client($kernel);
|
$client = new KernelBrowser($kernel);
|
||||||
|
|
||||||
$client->request('GET', '/');
|
$client->request('GET', '/');
|
||||||
$client->request('GET', '/_profiler/latest?panel=this-panel-does-not-exist');
|
$client->request('GET', '/_profiler/latest?panel=this-panel-does-not-exist');
|
||||||
@ -98,7 +98,7 @@ class ProfilerControllerTest extends WebTestCase
|
|||||||
public function testPanelActionWithValidPanelAndToken()
|
public function testPanelActionWithValidPanelAndToken()
|
||||||
{
|
{
|
||||||
$kernel = new WebProfilerBundleKernel();
|
$kernel = new WebProfilerBundleKernel();
|
||||||
$client = new Client($kernel);
|
$client = new KernelBrowser($kernel);
|
||||||
|
|
||||||
$client->request('GET', '/');
|
$client->request('GET', '/');
|
||||||
$crawler = $client->request('GET', '/_profiler/latest?panel=router');
|
$crawler = $client->request('GET', '/_profiler/latest?panel=router');
|
||||||
@ -224,7 +224,7 @@ class ProfilerControllerTest extends WebTestCase
|
|||||||
public function testSearchBarActionDefaultPage()
|
public function testSearchBarActionDefaultPage()
|
||||||
{
|
{
|
||||||
$kernel = new WebProfilerBundleKernel();
|
$kernel = new WebProfilerBundleKernel();
|
||||||
$client = new Client($kernel);
|
$client = new KernelBrowser($kernel);
|
||||||
|
|
||||||
$crawler = $client->request('GET', '/_profiler/search_bar');
|
$crawler = $client->request('GET', '/_profiler/search_bar');
|
||||||
|
|
||||||
@ -316,7 +316,7 @@ class ProfilerControllerTest extends WebTestCase
|
|||||||
public function testSearchActionWithToken()
|
public function testSearchActionWithToken()
|
||||||
{
|
{
|
||||||
$kernel = new WebProfilerBundleKernel();
|
$kernel = new WebProfilerBundleKernel();
|
||||||
$client = new Client($kernel);
|
$client = new KernelBrowser($kernel);
|
||||||
|
|
||||||
$client->request('GET', '/');
|
$client->request('GET', '/');
|
||||||
$token = $client->getResponse()->headers->get('x-debug-token');
|
$token = $client->getResponse()->headers->get('x-debug-token');
|
||||||
@ -329,7 +329,7 @@ class ProfilerControllerTest extends WebTestCase
|
|||||||
public function testSearchActionWithoutToken()
|
public function testSearchActionWithoutToken()
|
||||||
{
|
{
|
||||||
$kernel = new WebProfilerBundleKernel();
|
$kernel = new WebProfilerBundleKernel();
|
||||||
$client = new Client($kernel);
|
$client = new KernelBrowser($kernel);
|
||||||
$client->followRedirects();
|
$client->followRedirects();
|
||||||
|
|
||||||
$client->request('GET', '/');
|
$client->request('GET', '/');
|
||||||
@ -355,7 +355,7 @@ class ProfilerControllerTest extends WebTestCase
|
|||||||
public function testPhpinfoAction()
|
public function testPhpinfoAction()
|
||||||
{
|
{
|
||||||
$kernel = new WebProfilerBundleKernel();
|
$kernel = new WebProfilerBundleKernel();
|
||||||
$client = new Client($kernel);
|
$client = new KernelBrowser($kernel);
|
||||||
|
|
||||||
$client->request('GET', '/_profiler/phpinfo');
|
$client->request('GET', '/_profiler/phpinfo');
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ class CacheDataCollector extends DataCollector implements LateDataCollectorInter
|
|||||||
|
|
||||||
public function lateCollect()
|
public function lateCollect()
|
||||||
{
|
{
|
||||||
$this->data = $this->cloneVar($this->data);
|
$this->data['instances']['calls'] = $this->cloneVar($this->data['instances']['calls']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user