CGI tests
| From: | zoe | Date: | Sat, 18 Jul 2009 09:25:14 +0000 |
| Subject: | CGI tests | ||
| Groups: | php.qa | ||
| Request: | Send a blank email to php-qa+get-65221@lists.php.net to get a copy of this message | ||
Hi
I've tripped over a problem in some of the tests and before I modify the tests I just wanted to check that I'm not missing something.
Quite a few PHP-CGI tests have this SKIPIF section:
--SKIPIF--
<?php if (php_sapi_name()=='cli') die('skip'); ?>
I suppose that this is designed to stop the test running if the php-cgi isn't available. However - I think there is a flaw in the logic.
If run-tests.php detects that the test requires the CGI sapi (which it does by checking for the presence of GET, POST etc sections), then it will try and use the CGI executable to run the SKIPIF section, if there isn't a php-cgi available it won't be able to :-) So the check would never be executed.
I have removed the SKIPIF section in a couple of tests and they still skip because run-tests.php checks if it has a cgi sapi available and skips the test if it doesn't.
Can anyone else see any reason not to get rid of this type of SKIPIF? I've only found it in about 20 tests - so quite easy for me to fix.
Zoe