Skip the intl notice if run with phpunit

This commit is contained in:
Jakub Zalas 2019-10-05 08:23:15 +02:00 committed by Nicolas Grekas
parent d2f81998c0
commit 25461b358c
2 changed files with 4 additions and 1 deletions

View File

@ -205,7 +205,7 @@ class FrameworkExtension extends Extension
->addError('You cannot use the "slugger" service since the Translation contracts are not installed. Try running "composer require symfony/translation".');
}
if (!\extension_loaded('intl')) {
if (!\extension_loaded('intl') && !\defined('PHPUNIT_COMPOSER_INSTALL')) {
@trigger_error('Please install the "intl" PHP extension for best performance.', E_USER_DEPRECATED);
}
}

View File

@ -16,6 +16,9 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
*/
class SluggerLocaleAwareTest extends AbstractWebTestCase
{
/**
* @requires extension intl
*/
public function testLocalizedSlugger()
{
$kernel = static::createKernel(['test_case' => 'Slugger', 'root_config' => 'config.yml']);