Re: IMAP tests
| From: | Nuno Lopes | Date: | Wed, 09 Sep 2009 10:47:45 +0000 |
| Subject: | Re: IMAP tests | ||
| References: | 1 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-65354@lists.php.net to get a copy of this message | ||
Why don't you go the easy way and create the username that the tests expect?
You shouldn't be running the tests with your user. So if you need to create a test user, why don't stick with the one that the test expects? It's simpler, faster and hassle free.
Nuno
----- Original Message -----
Hello ! I'm focusing on imap tests, as I saw that code coverage isn't perfect for this extension. I can see a recurrent problem in ext/imap/tests/*.phpt files, section EXPECTF: mailbox name / parameters are fixed and not a regular expression. Example in imap_bodystruct_basic.phpt: --EXPECTF-- *** Testing string imap_bodystruct : basic functionality *** Create a new mailbox for test and add a multipart msgs Create a temporary mailbox and add 1 msgs .. mailbox '{localhost/norsh}INBOX.phpttest' created [...] To make my tests, I need to modify imap_include.inc to match my servername and username/password, but the changes are useless because expected output does not match my modifications. Also, I must edit two files (skipif.inc and imap_include.inc) to change access. Maybe grouping it in one file would be better. So it would be great if someone could change EXPECTF sections and use regular expressions + merging *.inc if possible. If nobody has time to do it, I can work on it today/tomorrow and provide a .diff for this folder. Just ask ;) Olivier