Skip the intl notice if run with phpunit
This commit is contained in:
parent
d2f81998c0
commit
25461b358c
@ -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".');
|
->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);
|
@trigger_error('Please install the "intl" PHP extension for best performance.', E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,9 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
|
|||||||
*/
|
*/
|
||||||
class SluggerLocaleAwareTest extends AbstractWebTestCase
|
class SluggerLocaleAwareTest extends AbstractWebTestCase
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @requires extension intl
|
||||||
|
*/
|
||||||
public function testLocalizedSlugger()
|
public function testLocalizedSlugger()
|
||||||
{
|
{
|
||||||
$kernel = static::createKernel(['test_case' => 'Slugger', 'root_config' => 'config.yml']);
|
$kernel = static::createKernel(['test_case' => 'Slugger', 'root_config' => 'config.yml']);
|
||||||
|
Reference in New Issue
Block a user