ZF-8321: testSetAndGetMagicFile(Zend_Validate_File_MimeTypeTest) unit tests failure


{panel} 1) testSetAndGetMagicFile(Zend_Validate_File_MimeTypeTest) Failed asserting that is true. /home/cawa/ZendFramework/svn/framework/trunk/tests/Zend/Validate/File/MimeTypeTest.php:171 {panel}


testSetAndGetMagicFile expects empty string returned by getMagicFile() method.

But, if any of the following files exists, it used as an initial magic file value. {panel} /usr/share/misc/magic /usr/share/misc/magic.mime /usr/share/misc/magic.mgc /usr/share/mime/magic /usr/share/mime/magic.mime /usr/share/mime/magic.mgc /usr/share/file/magic /usr/share/file/magic.mime /usr/share/file/magic.mgc {panel}

PS getMagicFile() initializes Zend_Validate_File_MimeType::$_magicfile property from the specified list only if 'MAGIC' environment variable not set. But it does nothing if 'MAGIC' env variable is present. Is it correct?

Alex -- I believe this is a problem with Zend Server. I've had similar issues testing. If I specify the path to the magic file, it works fine, but relying on the MAGIC env variable does not.

I am not using Zend_Server. So there is no way for me to reproduce this behaviour.

Would it work if the test checks is MAGIC is set? And if not set, simply ignore all further tests?

Should be fixed with r19033. Can you evaluate and give feedback?

Closing as fixed. Please reopen when it's still buggy.