merged branch mvrhov/test_fixes (PR #2357)

Commits
-------

395f580 Rebuild resource files with genrb from ICU 4.2. as ICU 4.4 by default builds them in newer format. Also added all files necessary to build resources.dat with pkgdat because syntax for command is so cryptic
438581d Skip test if running as superuser as it will fail

Discussion
----------

Fixes failing tests

This one closes both the #2355 and #2356
This commit is contained in:
Fabien Potencier 2011-10-08 18:10:49 +02:00
commit 35c5e1b8cd
7 changed files with 10 additions and 0 deletions

View File

@ -79,6 +79,10 @@ class MimeTypeTest extends \PHPUnit_Framework_TestCase
$this->markTestSkipped('Can not verify chmod operations on Windows');
}
if (in_array(get_current_user(), array('root'))) {
$this->markTestSkipped('This test will fail if run under superuser');
}
$path = __DIR__.'/../Fixtures/to_delete';
touch($path);
chmod($path, 0333);

View File

@ -19,6 +19,7 @@ class ResourceBundleFileLoaderTest extends LocalizedTestCase
{
public function testLoad()
{
// resource is build using genrb command
$loader = new ResourceBundleLoader();
$resource = __DIR__.'/../fixtures/resourcebundle/res';
$catalogue = $loader->load($resource, 'en', 'domain1');
@ -30,6 +31,9 @@ class ResourceBundleFileLoaderTest extends LocalizedTestCase
public function testDatEnglishLoad()
{
// bundled resource is build using pkgdata command which at leas in ICU 4.2 comes in extremely! buggy form
// you must specify an temporary build directory which is not the same as current directory and
// MUST reside on the same partition. pkgdata -p resources -T /srv -d . packagelist.txt
$loader = new ResourceBundleLoader();
$resource = __DIR__.'/../fixtures/resourcebundle/dat/resources';
$catalogue = $loader->load($resource, 'en', 'domain1');