Re: Tests repository
| From: | Stanislav Malyshev | Date: | Fri, 12 Mar 2010 23:27:52 +0000 |
| Subject: | Re: Tests repository | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-47201@lists.php.net to get a copy of this message | ||
Hi!
It is always possible to write a test for both versions (except namespace). However it requires a radical change on how we test things. Instead of testing the output of given script, we will have to add logics in a test, something similar to the classic xUnit frameworks. For example, we will have to do the error msg check inside the testIt is possible, but that means instead of 2 trees of files you'd have these trees distributed inside test files in a myriad of small if()s: if(version == X) { test this error message } elseif(version == Y) { test that error message } else { test that another error message } and the same for different pieces of function, etc. Why is it better? -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com