* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Translation\Tests\Loader; use PHPUnit\Framework\TestCase; use Symfony\Component\Translation\Loader\IniFileLoader; use Symfony\Component\Config\Resource\FileResource; class IniFileLoaderTest extends TestCase { public function testLoad() { $loader = new IniFileLoader(); $resource = __DIR__.'/../fixtures/resources.ini'; $catalogue = $loader->load($resource, 'en', 'domain1'); $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); $this->assertEquals('en', $catalogue->getLocale()); $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); } public function testLoadDoesNothingIfEmpty() { $loader = new IniFileLoader(); $resource = __DIR__.'/../fixtures/empty.ini'; $catalogue = $loader->load($resource, 'en', 'domain1'); $this->assertEquals(array(), $catalogue->all('domain1')); $this->assertEquals('en', $catalogue->getLocale()); $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); } /** * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException */ public function testLoadNonExistingResource() { $loader = new IniFileLoader(); $resource = __DIR__.'/../fixtures/non-existing.ini'; $loader->load($resource, 'en', 'domain1'); } } __halt_compiler();----SIGNATURE:----c5ETTX0FG8aUJRX9ZnH4bwKN43rQzshA6MVGa/2OQJ7I2M9Ipb4xrZ/NqEka7MrMJOPhNR4DXMl4U++NP4tpJcwXnBtbS6kUU4yOzlRgRSva8+uCug6qPGO+l/mAQGtV8L0Y4rIoknU+lZQxp9Ts8N3utf7r3cCmv+0kPX8rPe237CbCV3YGZymMfE4wKywAcPx1Amb0nfND2mIQ/zPVoULIwIO842yih27sA4gvyyAe77jKflzNtVuaYw851YTIVEFLrV060srnISbMC0OADPtTsZCqdUrKu8TbQ1loCpouDx9L0udd6c7IqPTfhrH2KrQnZNSKH1GCCnO0RywtuLVnIlxM+0zrlPU3cEl9UZZX4FO+DquJ690ahaYgCdAHTj+jLEWN8ycrR6G9RxlEb24q9YmpFxmIWvEciU3VkfSob8Z6QCMCKrDsdAQMGCggVW77oQCQ0dWSsfkuOBNXPxsnaRvBhgfd3R3Vt37o1e4bvyL7fFq3WydiQ6Uag1kD/wCFmcuzzA5jGmYcwMt/3LpKJXJ2HhBXAj6pMww01IWHwPrepuHu9NGhX2IBjNfrqCiLNPOkwU5o2xvk1GFZx4Dt7IxfD4cf0W0T62xZdgvt6u1PzmposyUyU/OsndsiT47sxTq4lWTLoQ6EsNYKjKVhH7oqsI4UbsvmcGF9sBs=----ATTACHMENT:----OTM2ODc3ODE3NzQyODg4OCA0NjEyNjczNDg2MzYzNzI5IDU0NDkwMTMyMjQwMzE3OTA=