Hi,
There is an issue with log file permissions that causes functional tests to
return dubious here on my work windows PC.
The problem is that sfToolkitCleanDirectory tries to unlink my
frontend_test.log file.
I assume that the file was not "closed" properly. on *ix based systems this
works fine. In windows it throws a warning:
"Warning:
unlink(D:\projects\sf1.1\lib\plugins\sfCompat10Plugin\test\functional\fixtures\log\frontend_test.log):
Permissi
on denied in D:\projects\sf1.1\lib\util\sfToolkit.class.php on line 87"
This warning is output by the //remove all cache line in the code below. I
assume the logfile was created by the ProjectConfiguration and is now open.
The warning itself is not that critical, but the shutdown handler has the
same problem.
It treas the warning different and throws:
PHP Fatal error: Exception thrown without a stack frame in Unknown on line
0
I think the first warning is easier to resolve. just move the "clean-call"
before the getAppConfig line.
The second is interesting. although the Logger->shutdown fires before the
test-cleanup, so the resource IS closed before, the code still has a
permission denied error.
Is this a php windows bug? or did i miss that somebody still holds a handle
to that file?
.: Fabian
---- Test Code Bootstrap---
require_once $root_dir.'/config/ProjectConfiguration.class.php';
$configuration = ProjectConfiguration::getApplicationConfiguration($app,
'test', isset($debug) ? $debug : true);
sfContext::createInstance($configuration);
// remove all cache
sf_functional_test_shutdown();
register_shutdown_function('sf_functional_test_shutdown');
function sf_functional_test_shutdown()
{
sfToolkit::clearDirectory(sfConfig::get('sf_cache_dir'));
sfToolkit::clearDirectory(sfConfig::get('sf_log_dir'));
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---