[TESTS] Fix deprecations

This commit is contained in:
Hugo Sales 2021-03-31 15:12:01 +00:00
parent a8b599d213
commit 99c4e8ded5
2 changed files with 5 additions and 4 deletions

View File

@ -19,9 +19,9 @@
namespace App\Tests\Util\Form\ActorArrayTransformer;
use App\Entity\Poll;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use PHPUnit\Framework\TestCase;
class PollTest extends WebTestCase
class PollTest extends TestCase
{
public function testPoll()
{

View File

@ -53,12 +53,13 @@ class ExtensionTest extends KernelTestCase
//Check if every icon file as a ".svg.twig" extension
foreach ($icon_file_names as $icon_file_name) {
static::assertRegExp('/.svg.twig/', $icon_file_name);
static::assertMatchesRegularExpression('/.svg.twig/', $icon_file_name);
}
//Check if the function gives a valid HTML with a class attribute equal to the one passed
static::bootKernel();
$twig = self::$kernel->getContainer()->get('twig');
$container = self::$kernel->getContainer()->get('test.service_container');
$twig = $container->get('twig');
foreach ($icon_file_names as $icon_file_name) {
$icon_name = basename($icon_file_name, '.svg.twig');