for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* File containing the CollectorTest class.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
namespace eZ\Bundle\EzPublishCoreBundle\Tests\Translation;
use eZ\Bundle\EzPublishCoreBundle\Translation\Collector;
class CollectorTest extends \PHPUnit_Framework_TestCase
{
public function testCollect()
$translationRootDir = str_replace('/Tests/Translation', '/Tests/Resources/Translation/vendor', __DIR__);
$collector = new Collector($translationRootDir);
$files = $collector->collect();
$this->assertEquals(3, count($files));
foreach ($files as $file) {
$this->assertEquals(4, count($file));
$this->assertTrue(in_array($file['domain'], ['messages', 'dashboard']));
$this->assertTrue(in_array($file['locale'], ['fr', 'ach_UG']));
$this->assertEquals($file['format'], 'xlf');
}