Closed pierrejoye closed 10 years ago
@pierrejoye I tried to fix tests but I don't know if I missed something...
The problem comes from the value of DIRECTORY_SEPARATOR
and the fact that it was used in tests and not in code.
I think it would have been good to edit the src to have the DIRECTORY_SEPARATOR
than removing from tests.
Using / or \ just works. I do not think we need to change the source code but adapt the tests accordingly.
In phpt, we simply use %ssomfile.php for example.
I wrote the test and the code on different branches and when merging everything, I did not take care of DIRECTORY_SEPARATOR
. I also don't think we should edit the source code but rather make the tests handle everything correctly.
Tests should now be OK ;)
Thanks!
C:\php-sdk\repo\pickle>vendor\bin\atoum
PHP path: c:\temp\php559tsx86\php.exe PHP version: => PHP 5.5.9 (cli) (built: Feb 5 2014 13:02:39) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies Pickle\tests\units\Package... [....____][0/4] [S...____][1/4] [SS..____][2/4] [SSS.____][3/4] [SSSS____][4/4] => Test duration: 0.04 second. => Memory usage: 2.00 Mb. Pickle\tests\units\Package\JSON\Parser... [..__][0/2] [S.__][1/2] [SS__][2/2] => Test duration: 0.30 second. => Memory usage: 0.50 Mb. Pickle\tests\units\Package\XML\Converter... [......__][0/6] [S.....__][1/6] [SS....__][2/6] [SSS...__][3/6] [SSSS..__][4/6] [SSSSS.__][5/6] [SSSSSS__][6/6] => Test duration: 0.06 second. => Memory usage: 3.00 Mb. Pickle\tests\units\Package\XML\Parser... [..__][0/2] [S.__][1/2] [SS__][2/2] => Test duration: 0.02 second. => Memory usage: 0.75 Mb. Total tests duration: 0.41 second. Total tests memory usage: 6.25 Mb. Running duration: 1.44 seconds. Success (4 tests, 14/14 methods, 0 void method, 0 skipped method, 58 assertions)!
:+1: good for green.