开发者

PHPUnit reporting "Aborted" no matter what tests are run

Having a weird problem with PHPUnit. We're using PHPUnit as part of a continuous integration environment, that contains one app written using Zend Framework and one app written using CodeIgniter.

Unit tests run just fine under Zend Framework, but whenever I run the tests for CodeIgniter using fooStack's CIUnit bridge, I always get the same problem at the end:

PHPUnit 3.4.14 by Sebastian Bergmann.

............... .

Time: 1 second, Memory: 7.00Mb

OK (16 tests, 14 assertions)
Aborted

First off, I do not know what those empty spaces between the . means.

Secondly, no mat开发者_如何学Goter what test I run (all of them or each one separately) I get the same Aborted message at the very end. The tests themselves do not contain any exit or die statements.

When I run the same version of PHPUnit on my laptop (running OS-X Snow Leopard and same version of Zend Server Community Edition) I do not get that aborted message.

Running PHP 5.3.2 on Ubuntu installed using Zend Server Community Edition.

Any help with this would be greatly appreciated.


See: https://bugs.php.net/bug.php?id=53976

Adding -dzend.enable_gc=0 to the phpunit command line solved this problem when I encountered it.


First off, I do not know what those empty spaces between the . means.

Means your subtest is echoing a space char. Look for any echo statements, or whitespace before or after <?php ?> tags. This'll be easier if you narrow it down to a single subtest first, of course -- worst case you can comment the others out one by one.

Secondly, no matter what test I run (all of them or each one separately) I get the same Aborted message at the very end. The tests themselves do not contain any exit or die statements.

Probably a problem with your PHP config independent of phpunit. Try running php CLI itself. e.g., instead of running phpunit mytest.php, run php mytest.php. Or even php -i alone. If you still see the "Aborted" message, you have a PHP CLI config issue, not a phpunit issue.

Running PHP 5.3.2 on Ubuntu installed using Zend Server Community Edition.

Stab in the dark, but if you're using zend accelerator, make sure APC isn't also installed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜