forked from wallabag/wallabag
twig implementation
This commit is contained in:
41
vendor/symfony/intl/Symfony/Component/Intl/Tests/Globals/AbstractIntlGlobalsTest.php
vendored
Normal file
41
vendor/symfony/intl/Symfony/Component/Intl/Tests/Globals/AbstractIntlGlobalsTest.php
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Intl\Tests\Globals;
|
||||
|
||||
/**
|
||||
* Test case for intl function implementations.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
abstract class AbstractIntlGlobalsTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function errorNameProvider()
|
||||
{
|
||||
return array (
|
||||
array(-129, '[BOGUS UErrorCode]'),
|
||||
array(0, 'U_ZERO_ERROR'),
|
||||
array(1, 'U_ILLEGAL_ARGUMENT_ERROR'),
|
||||
array(9, 'U_PARSE_ERROR'),
|
||||
array(129, '[BOGUS UErrorCode]'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider errorNameProvider
|
||||
*/
|
||||
public function testGetErrorName($errorCode, $errorName)
|
||||
{
|
||||
$this->assertSame($errorName, $this->getIntlErrorName($errorCode));
|
||||
}
|
||||
|
||||
abstract protected function getIntlErrorName($errorCode);
|
||||
}
|
||||
22
vendor/symfony/intl/Symfony/Component/Intl/Tests/Globals/IntlGlobalsTest.php
vendored
Normal file
22
vendor/symfony/intl/Symfony/Component/Intl/Tests/Globals/IntlGlobalsTest.php
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Intl\Tests\Globals;
|
||||
|
||||
use Symfony\Component\Intl\Globals\IntlGlobals;
|
||||
|
||||
class IntlGlobalsTest extends AbstractIntlGlobalsTest
|
||||
{
|
||||
protected function getIntlErrorName($errorCode)
|
||||
{
|
||||
return IntlGlobals::getErrorName($errorCode);
|
||||
}
|
||||
}
|
||||
36
vendor/symfony/intl/Symfony/Component/Intl/Tests/Globals/Verification/IntlGlobalsTest.php
vendored
Normal file
36
vendor/symfony/intl/Symfony/Component/Intl/Tests/Globals/Verification/IntlGlobalsTest.php
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Intl\Tests\Globals\Verification;
|
||||
|
||||
use Symfony\Component\Intl\Tests\Globals\AbstractIntlGlobalsTest;
|
||||
use Symfony\Component\Intl\Util\IntlTestHelper;
|
||||
|
||||
/**
|
||||
* Verifies that {@link AbstractIntlGlobalsTest} matches the behavior of the
|
||||
* intl functions with a specific version of ICU.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
class IntlGlobalsTest extends AbstractIntlGlobalsTest
|
||||
{
|
||||
protected function setUp()
|
||||
{
|
||||
IntlTestHelper::requireFullIntl($this);
|
||||
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
protected function getIntlErrorName($errorCode)
|
||||
{
|
||||
return intl_error_name($errorCode);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user