Merge pull request #4 from stealth35/test_mo_loader

[Translation] fix gettext tests
This commit is contained in:
Christophe Coevoet 2011-11-09 03:13:48 -08:00
commit d974a4a465
2 changed files with 6 additions and 6 deletions

View File

@ -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());
}
}

View File

@ -1,2 +1,3 @@
msgid "foo"
msgstr "bar"
msgstr "bar"