Re: run-test and .php
| From: | Greg Beaver | Date: | Tue, 23 Nov 2004 04:53:11 +0000 |
| Subject: | Re: run-test and .php | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-34508@lists.php.net to get a copy of this message | ||
Ryan King wrote:
Hi- I've just started using pear run-tests and .phpt with the Config package and have some questions/concerns. First of all, I accidentally used a .php extension for a test file and when I typed: pear run-tests bug2742.php I got: [quote] FAIL simple test [bug2742.php] Notice: Undefined index: in RunTest.php on line 97 Notice: Undefined index: FILE in RunTest.php on line 160 Notice: Undefined index: EXPECT in RunTest.php on line 209 PASS (unnamed test) [bug2742.php] [/quote] Ok, I know I made a mistake, but after running this the file (bug2742.php) was gone! Not moved anywhere, gone! I'm don't think this is a good way to handle a user error! :-)I fixed this issue in PEAR/Command/Package.php just yesterday, I think.
Unfortunately, it won't work with PEAR 1.3, but you can cut and paste doRunTests() and it will work just fine.
Ok, after I recreated the file and named it bug2742.phpt, I was able to run the test. However it always appears to run the test twice. Here's my output: $ pear run-tests bug2742.phpt FAIL bug 2742 regression [bug2742.phpt] FAIL bug 2742 regression [bug2742.phpt] FAILED TESTS: bug2742.phptweird. Could be a unix peculiarity, I'll see if I can replicate. Greg