4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Translation\Tests\Util;
14 use PHPUnit\Framework\TestCase;
15 use Symfony\Component\Translation\Util\ArrayConverter;
17 class ArrayConverterTest extends TestCase
20 * @dataProvider messagesData
22 public function testDump($input, $expectedOutput)
24 $this->assertEquals($expectedOutput, ArrayConverter::expandToTree($input));
27 public function messagesData()
39 'foo' => array('bar' => 'value'),
45 'foo.bar' => 'value1',
46 'foo.bar.test' => 'value2',
52 'bar.test' => 'value2',
59 'foo.level2.level3.level4' => 'value1',
60 'foo.level2' => 'value2',
61 'foo.bar' => 'value3',
67 'level2.level3.level4' => 'value1',