Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 3.133.142.101
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
3 /
symfony /
translation /
Tests /
Delete
Unzip
Name
Size
Permission
Date
Action
Catalogue
[ DIR ]
drwxr-xr-x
2018-11-27 09:00
Command
[ DIR ]
drwxr-xr-x
2018-11-27 09:00
DataCollector
[ DIR ]
drwxr-xr-x
2018-11-27 09:00
DependencyInjection
[ DIR ]
drwxr-xr-x
2018-11-27 09:00
Dumper
[ DIR ]
drwxr-xr-x
2018-11-27 09:00
Extractor
[ DIR ]
drwxr-xr-x
2018-11-27 09:00
Formatter
[ DIR ]
drwxr-xr-x
2018-11-27 09:00
Loader
[ DIR ]
drwxr-xr-x
2018-11-27 09:00
Util
[ DIR ]
drwxr-xr-x
2018-11-27 09:00
Writer
[ DIR ]
drwxr-xr-x
2018-11-27 09:00
fixtures
[ DIR ]
drwxr-xr-x
2018-11-27 09:00
DataCollectorTranslatorTest.php
3.81
KB
-rw-r--r--
2018-11-27 09:00
IdentityTranslatorTest.php
542
B
-rw-r--r--
2018-11-27 09:00
IntervalTest.php
1.24
KB
-rw-r--r--
2018-11-27 09:00
LoggingTranslatorTest.php
2.19
KB
-rw-r--r--
2018-11-27 09:00
MessageCatalogueTest.php
9.89
KB
-rw-r--r--
2018-11-27 09:00
MessageSelectorTest.php
7.88
KB
-rw-r--r--
2018-11-27 09:00
PluralizationRulesTest.php
3.98
KB
-rw-r--r--
2018-11-27 09:00
TranslatorCacheTest.php
11.92
KB
-rw-r--r--
2018-11-27 09:00
TranslatorTest.php
22.94
KB
-rw-r--r--
2018-11-27 09:00
Save
Rename
<?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\Translation\Tests; use PHPUnit\Framework\TestCase; use Symfony\Component\Translation\MessageSelector; /** * @group legacy */ class MessageSelectorTest extends TestCase { /** * @dataProvider getChooseTests */ public function testChoose($expected, $id, $number) { $selector = new MessageSelector(); $this->assertEquals($expected, $selector->choose($id, $number, 'en')); } public function testReturnMessageIfExactlyOneStandardRuleIsGiven() { $selector = new MessageSelector(); $this->assertEquals('There are two apples', $selector->choose('There are two apples', 2, 'en')); } /** * @dataProvider getNonMatchingMessages * @expectedException \Symfony\Component\Translation\Exception\InvalidArgumentException */ public function testThrowExceptionIfMatchingMessageCannotBeFound($id, $number) { $selector = new MessageSelector(); $selector->choose($id, $number, 'en'); } public function getNonMatchingMessages() { return array( array('{0} There are no apples|{1} There is one apple', 2), array('{1} There is one apple|]1,Inf] There are %count% apples', 0), array('{1} There is one apple|]2,Inf] There are %count% apples', 2), array('{0} There are no apples|There is one apple', 2), ); } public function getChooseTests() { return array( array('There are no apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0), array('There are no apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0), array('There are no apples', '{0}There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0), array('There is one apple', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 1), array('There are %count% apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 10), array('There are %count% apples', '{0} There are no apples|{1} There is one apple|]1,Inf]There are %count% apples', 10), array('There are %count% apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 10), array('There are %count% apples', 'There is one apple|There are %count% apples', 0), array('There is one apple', 'There is one apple|There are %count% apples', 1), array('There are %count% apples', 'There is one apple|There are %count% apples', 10), array('There are %count% apples', 'one: There is one apple|more: There are %count% apples', 0), array('There is one apple', 'one: There is one apple|more: There are %count% apples', 1), array('There are %count% apples', 'one: There is one apple|more: There are %count% apples', 10), array('There are no apples', '{0} There are no apples|one: There is one apple|more: There are %count% apples', 0), array('There is one apple', '{0} There are no apples|one: There is one apple|more: There are %count% apples', 1), array('There are %count% apples', '{0} There are no apples|one: There is one apple|more: There are %count% apples', 10), array('', '{0}|{1} There is one apple|]1,Inf] There are %count% apples', 0), array('', '{0} There are no apples|{1}|]1,Inf] There are %count% apples', 1), // Indexed only tests which are Gettext PoFile* compatible strings. array('There are %count% apples', 'There is one apple|There are %count% apples', 0), array('There is one apple', 'There is one apple|There are %count% apples', 1), array('There are %count% apples', 'There is one apple|There are %count% apples', 2), // Tests for float numbers array('There is almost one apple', '{0} There are no apples|]0,1[ There is almost one apple|{1} There is one apple|[1,Inf] There is more than one apple', 0.7), array('There is one apple', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 1), array('There is more than one apple', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 1.7), array('There are no apples', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 0), array('There are no apples', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 0.0), array('There are no apples', '{0.0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 0), // Test texts with new-lines // with double-quotes and \n in id & double-quotes and actual newlines in text array("This is a text with a\n new-line in it. Selector = 0.", '{0}This is a text with a new-line in it. Selector = 0.|{1}This is a text with a new-line in it. Selector = 1.|[1,Inf]This is a text with a new-line in it. Selector > 1.', 0), // with double-quotes and \n in id and single-quotes and actual newlines in text array("This is a text with a\n new-line in it. Selector = 1.", '{0}This is a text with a new-line in it. Selector = 0.|{1}This is a text with a new-line in it. Selector = 1.|[1,Inf]This is a text with a new-line in it. Selector > 1.', 1), array("This is a text with a\n new-line in it. Selector > 1.", '{0}This is a text with a new-line in it. Selector = 0.|{1}This is a text with a new-line in it. Selector = 1.|[1,Inf]This is a text with a new-line in it. Selector > 1.', 5), // with double-quotes and id split accros lines array('This is a text with a new-line in it. Selector = 1.', '{0}This is a text with a new-line in it. Selector = 0.|{1}This is a text with a new-line in it. Selector = 1.|[1,Inf]This is a text with a new-line in it. Selector > 1.', 1), // with single-quotes and id split accros lines array('This is a text with a new-line in it. Selector > 1.', '{0}This is a text with a new-line in it. Selector = 0.|{1}This is a text with a new-line in it. Selector = 1.|[1,Inf]This is a text with a new-line in it. Selector > 1.', 5), // with single-quotes and \n in text array('This is a text with a\nnew-line in it. Selector = 0.', '{0}This is a text with a\nnew-line in it. Selector = 0.|{1}This is a text with a\nnew-line in it. Selector = 1.|[1,Inf]This is a text with a\nnew-line in it. Selector > 1.', 0), // with double-quotes and id split accros lines array("This is a text with a\nnew-line in it. Selector = 1.", "{0}This is a text with a\nnew-line in it. Selector = 0.|{1}This is a text with a\nnew-line in it. Selector = 1.|[1,Inf]This is a text with a\nnew-line in it. Selector > 1.", 1), // esacape pipe array('This is a text with | in it. Selector = 0.', '{0}This is a text with || in it. Selector = 0.|{1}This is a text with || in it. Selector = 1.', 0), // Empty plural set (2 plural forms) from a .PO file array('', '|', 1), // Empty plural set (3 plural forms) from a .PO file array('', '||', 1), ); } }