aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/symfony/intl/Symfony/Component/Intl/Tests/NumberFormatter/Verification/NumberFormatterTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/intl/Symfony/Component/Intl/Tests/NumberFormatter/Verification/NumberFormatterTest.php')
-rw-r--r--vendor/symfony/intl/Symfony/Component/Intl/Tests/NumberFormatter/Verification/NumberFormatterTest.php54
1 files changed, 54 insertions, 0 deletions
diff --git a/vendor/symfony/intl/Symfony/Component/Intl/Tests/NumberFormatter/Verification/NumberFormatterTest.php b/vendor/symfony/intl/Symfony/Component/Intl/Tests/NumberFormatter/Verification/NumberFormatterTest.php
new file mode 100644
index 00000000..28e6fe90
--- /dev/null
+++ b/vendor/symfony/intl/Symfony/Component/Intl/Tests/NumberFormatter/Verification/NumberFormatterTest.php
@@ -0,0 +1,54 @@
1<?php
2
3/*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <fabien@symfony.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12namespace Symfony\Component\Intl\Tests\NumberFormatter\Verification;
13
14use Symfony\Component\Intl\Tests\NumberFormatter\AbstractNumberFormatterTest;
15use Symfony\Component\Intl\Util\IntlTestHelper;
16
17/**
18 * Note that there are some values written like -2147483647 - 1. This is the lower 32bit int max and is a known
19 * behavior of PHP.
20 */
21class NumberFormatterTest extends AbstractNumberFormatterTest
22{
23 protected function setUp()
24 {
25 IntlTestHelper::requireFullIntl($this);
26
27 parent::setUp();
28 }
29
30 public function testCreate()
31 {
32 $this->assertInstanceOf('\NumberFormatter', \NumberFormatter::create('en', \NumberFormatter::DECIMAL));
33 }
34
35 protected function getNumberFormatter($locale = 'en', $style = null, $pattern = null)
36 {
37 return new \NumberFormatter($locale, $style, $pattern);
38 }
39
40 protected function getIntlErrorMessage()
41 {
42 return intl_get_error_message();
43 }
44
45 protected function getIntlErrorCode()
46 {
47 return intl_get_error_code();
48 }
49
50 protected function isIntlFailure($errorCode)
51 {
52 return intl_is_failure($errorCode);
53 }
54}