Friday, February 3. 2006TAP Compliant PHP Testing HarnessTrackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
Is there anything more to your TAP work for PHP? Just wondering since I'm looking at testing tools and I'd like something like this. What is here looks good.
Please consider this a bug report. I have started using test-more.php to write basic unit tests of code I inherited a couple of years ago. But when I try to wrap that with your test-harness.php, I run into a major problem. I have 1.0beta, which I am running under Windows XP Pro. The escapeshellcmd() function takes the paths returned from dirname(__FILE__) and replaces the slashes with spaces. This produces a series of failed tests, but the harness reports them all as passed tests. The console produces the following:
D:\Code\Odyssey\PCS\ManageMyID\main\t>php test-harness.php -v formatCCUnitTest.php..............................ok Could not open input file: D: getFeeFromCommentsUnitTest.php....................ok Could not open input file: D: goodAmountUnitTest.php............................ok Could not open input file: D: sessionKVUnitTest.php.............................ok Could not open input file: D: validFeeUnitTest.php..............................ok Could not open input file: D: validateAmountsUnitTest.php.......................ok Could not open input file: D: All test scripts passed! All subtests passed! This actually appears to describe two bugs. First is the mangled path, and the second is failure to detect the system error the first problem produced. Thank you, Bob McConnell D:\Code\Odyssey\PCS\ManageMyID\main\t>php -v PHP 5.2.10 (cli) (built: Jun 17 2009 16:16:57) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
Bob,
Try this: http://pastebin.com/t9BQNqy2 I unfortunately don't have a windows box to test this on. I am also pretty shaky on this code. It was a bit of a trip down memory lane
Yes, this fixes both issues. I tested the two changes independently to make sure. Thank you.
|
Paying for the Site
QuicksearchCategoriesArchivesDaily ReadsThe PHP WTF Sebastian Bergmann Wez Furlong Tom Sommer Tobias Schlitt Chris Shiflett Ben Ramsey adam trachtenberg Sklar george schlossnagle Dynamically Typed (Harry Fuecks) John Coggeshall John Lim Marco Tabini PHP Application Tools Planet PHP PHPCommunity.org |

