Bug #54411 [Opn->Bgs]: PHP Unit fails with comment tags in strings

From: Date: Tue, 29 Mar 2011 09:46:02 +0000
Subject: Bug #54411 [Opn->Bgs]: PHP Unit fails with comment tags in strings
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-159830@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=54411&edit=1 ID: 54411 Updated by: aharvey@php.net Reported by: ninja9578 at yahoo dot com Summary: PHP Unit fails with comment tags in strings -Status: Open +Status: Bogus Type: Bug Package: Unknown/Other Function Operating System: Ubuntu x86 PHP Version: 5.3.6 Block user comment: N Private report: N New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. My guess is that you have an unclosed string somewhere earlier in your script. Previous Comments: ------------------------------------------------------------------------ [2011-03-28 18:24:53] ninja9578 at yahoo dot com Description: ------------ If you have a string that contains the characters /* in PHPUnit, all the tests after it will be ignored because for some reason it thinks that it is a comment. A quick workaround is to add a block comment immediately after it. public function testOne(){ //make sure that the directory is currently empty foreach(glob('/tmp/ftp/*') as $fn) { unlink($fn); } /* */ //<- this line is a workaround } Test script: --------------- public function testOne(){ //make sure that the directory is currently empty foreach(glob('/tmp/ftp/*') as $fn) { unlink($fn); } } public function testTwo(){ //This test case will not show up in the test list } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=54411&edit=1

« previous php.bugs (#159830) next »