tests: write a simple Export test for new indicators + fix depreciation with BrowserKit client

cfr: https://symfony.com/doc/4.4/components/browser_kit.html#creating-a-client
This commit is contained in:
2022-07-27 18:39:58 +02:00
parent 287d8f546b
commit b9186ed6e0
3 changed files with 83 additions and 2 deletions

View File

@@ -16,6 +16,7 @@ use Doctrine\ORM\NativeQuery;
use Doctrine\ORM\QueryBuilder;
use RuntimeException;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\BrowserKit\HttpBrowser;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Core\Role\Role;
use Traversable;
@@ -332,8 +333,9 @@ abstract class AbstractExportTest extends WebTestCase
*/
public function testListExportPage()
{
/** @var \Symfony\Component\BrowserKit\Client $client */
$client = $this->getClient();
/** @var HttpBrowser $client */
$client = new HttpBrowser();
$export = $this->getExport();
$prophet = new \Prophecy\Prophet();
$container = static::$kernel->getContainer();