[Solar-talk] Hard coded temp dir in unit tests
Paul M Jones
pmjones at solarphp.com
Mon Sep 18 12:29:20 PDT 2006
On Sep 18, 2006, at 2:19 PM, Andrew Shell wrote:
> 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.
--
Paul M. Jones <http://paul-m-jones.com>
Solar: Simple Object Library and Application Repository
for PHP5. <http://solarphp.com>
Savant: The simple, elegant, and powerful solution for
templates in PHP. <http://phpsavant.com>
More information about the solar-talk
mailing list