[Solar-talk] Hard coded temp dir in unit tests

Andrew Shell andrew at andrewshell.org
Mon Sep 18 12:47:57 PDT 2006


I'm running php 5.1.6 and it doesn't appear that sys_get_temp_dir 
works.  Perhaps that's included in 5.2?
> >/ I'm running Solar on Windows/Apache and I've noticed that in the unit
> />/ tests the temp dir in the tests is more or less hard coded to /tmp
> /
> Well that's dumb; who wrote that stuff anyway?   ... oh yeah.  ;-)
>
>
> >/ I have to do this for Test_Solar_Cache_Adapter_File,
> />/ Test_Solar_Log_Adapter_File and Test_Solar_Log_Adapter_Multi.   
> />/ Should we
> />/ include some of this configuration in the config.inc.php file by  
> />/ default
> />/ so people who plan to run the tests can see those options right  
> />/ away and
> />/ update them for their system?  Another possibility is to create a temp
> />/ dir in the distribution and have the paths set to this folder
> />/ automatically in a platform agnostic manner.  What do people think  
> />/ of this?
> /
> I think it's a good idea to be as platform agnostic as possible.   
> This might be an answer:
>
>      http://php.net/manual/en/function.sys-get-temp-dir.php
>
> Andrew, can you try using that in your installation (should be able  
> to put that in config.inc.php directly)?  If it works, I can rewrite  
> the tests to use the function to determine the temp-dir location.


More information about the solar-talk mailing list