Re: DB run tests
| From: | Greg Beaver | Date: | Thu, 29 Apr 2004 21:52:43 +0000 |
| Subject: | Re: DB run tests | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-28580@lists.php.net to get a copy of this message | ||
Daniel Convissor wrote:
Which version of PHP are you using? Under 5, I'm seeing db_error.phpt and db_error2.phpt failing due to toString() printing the class in a case sensitive manner while in PHP 4 it prints it in lowercase. Ugh. How toSee, it's problems like this that make run-tests.php a complete pain in the rear end to manage. The best solution is to write a simple function like so: function assertStringEquals($one, $two, $message) { if ($one == $two) { echo "OK\n"; } else { echo "expected:\n"; var_dump($one); echo "actual:\n"; var_dump($two); } } then, you can pass in different expected values based on the PHP version. the EXPECT section then can contain "OK" as the expected value, and will print the wrong value if so A quick compare would note that this idea is practically stolen from PHPUnit and is really needed in run-tests... Greg