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

Andrew Shell andrew at andrewshell.org
Mon Sep 18 12:59:51 PDT 2006


That should work...  I just tested it and $_ENV['TEMP'] contains 
C:\WINDOWS\TEMP which would be my system temp directory.

I've also noticed that there are a few places where constants should be 
used in tests and they are not so the tests fail.
in Test_Solar_Log_Adapter_Echo line 21 should be:

$expect = "info some information" . PHP_EOL . "debug a debug 
description" . PHP_EOL . "notice note this message" . PHP_EOL;

because in windows PHP_EOL is \r\n not \n

also in Test_Solar_Class_Map method testFetch_limited() should be using 
DIRECTORY_SEPARATOR instead of / otherwise the test fails.

If I notice anything else I can post them as well.

Andrew Shell

Paul M Jones wrote:
> On Sep 18, 2006, at 2:47 PM, Andrew Shell wrote:
>
>   
>> 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?
>>     
>
> Rats.
>
> Let's see if we can come up with an automated workaround rather than  
> forcing an edit on the config file.
>
> Mike Naberezny, I understood you to say elsewhere that we can pull  
> the temp dir location on Windows platforms with "%TEMP%" in some  
> fashion?
>
>
>
> --
>
> 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>
>
>
> _______________________________________________
> solar-talk mailing list
> solar-talk at lists.solarphp.com
> http://mail.killersoft.com/mailman/listinfo/solar-talk
>   



More information about the solar-talk mailing list