Merge pull request #4 from stealth35/test_mo_loader
[Translation] fix gettext tests
This commit is contained in:
commit
d974a4a465
@ -27,14 +27,13 @@ class MoFileLoaderTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertEquals(array(new FileResource($resource)), $catalogue->getResources());
|
||||
}
|
||||
|
||||
public function testLoadDoesNothingIfEmpty()
|
||||
/**
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testLoadInvalidResource()
|
||||
{
|
||||
$loader = new MoFileLoader();
|
||||
$resource = __DIR__.'/../fixtures/empty.mo';
|
||||
$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());
|
||||
}
|
||||
}
|
||||
|
@ -1,2 +1,3 @@
|
||||
msgid "foo"
|
||||
msgstr "bar"
|
||||
msgstr "bar"
|
||||
|
||||
|
Reference in New Issue
Block a user