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.144.132.48
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
unp /
vendor /
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\DataCollectorTranslator; use Symfony\Component\Translation\Loader\ArrayLoader; use Symfony\Component\Translation\Translator; class DataCollectorTranslatorTest extends TestCase { public function testCollectMessages() { $collector = $this->createCollector(); $collector->setFallbackLocales(array('fr', 'ru')); $collector->trans('foo'); $collector->trans('bar'); $collector->trans('choice', array('%count%' => 0)); $collector->trans('bar_ru'); $collector->trans('bar_ru', array('foo' => 'bar')); $expectedMessages = array(); $expectedMessages[] = array( 'id' => 'foo', 'translation' => 'foo (en)', 'locale' => 'en', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_DEFINED, 'parameters' => array(), 'transChoiceNumber' => null, ); $expectedMessages[] = array( 'id' => 'bar', 'translation' => 'bar (fr)', 'locale' => 'fr', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, 'parameters' => array(), 'transChoiceNumber' => null, ); $expectedMessages[] = array( 'id' => 'choice', 'translation' => 'choice', 'locale' => 'en', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_MISSING, 'parameters' => array('%count%' => 0), 'transChoiceNumber' => 0, ); $expectedMessages[] = array( 'id' => 'bar_ru', 'translation' => 'bar (ru)', 'locale' => 'ru', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, 'parameters' => array(), 'transChoiceNumber' => null, ); $expectedMessages[] = array( 'id' => 'bar_ru', 'translation' => 'bar (ru)', 'locale' => 'ru', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, 'parameters' => array('foo' => 'bar'), 'transChoiceNumber' => null, ); $this->assertEquals($expectedMessages, $collector->getCollectedMessages()); } /** * @group legacy */ public function testCollectMessagesTransChoice() { $collector = $this->createCollector(); $collector->setFallbackLocales(array('fr', 'ru')); $collector->transChoice('choice', 0); $expectedMessages = array(); $expectedMessages[] = array( 'id' => 'choice', 'translation' => 'choice', 'locale' => 'en', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_MISSING, 'parameters' => array('%count%' => 0), 'transChoiceNumber' => 0, ); $this->assertEquals($expectedMessages, $collector->getCollectedMessages()); } private function createCollector() { $translator = new Translator('en'); $translator->addLoader('array', new ArrayLoader()); $translator->addResource('array', array('foo' => 'foo (en)'), 'en'); $translator->addResource('array', array('bar' => 'bar (fr)'), 'fr'); $translator->addResource('array', array('bar_ru' => 'bar (ru)'), 'ru'); return new DataCollectorTranslator($translator); } }