Re: Writing tests about aliased functions
| From: | Christopher Jones | Date: | Thu, 07 May 2009 17:36:14 +0000 |
| Subject: | Re: Writing tests about aliased functions | ||
| References: | 1 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-64896@lists.php.net to get a copy of this message | ||
Olivier Doucet wrote:
Hello everyone, I would like to know if phptests should cover aliased PHP functions like get_required_files().If users can call it, the test suite should have some coverage. This helps prevent developer glitches e.g. accidentally deleting the PHP_FALIAS line in the source code. It also helps record functionality changes between versions. For example, if an alias is intentially removed in, for example PHP 6, then the PHP 6 test case can be updated with the new "Call to undefined function" message. This lets users (and future maintainers) understand the new behaviour is expected. I'm personally fine with whitebox testing of aliases: if they are 1-for-1 aliases, then only a basic test to verify the existence of each is needed. There's no need to repeat the whole test suite - especially when there are so many other parts of PHP that need basic testing. Chris -- Email: christopher.jones@oracle.com Twitter: http://twitter.com/ghrd