tags:

views:

28

answers:

1

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 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.

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.

A: 

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.

Frank Farmer
No stray ?> tags in my tests, and php -i does not report "Aborted". Not using Zend Accelerator or APC on that server either.The issue is clearly not PHPUnit, as my tests associated with the Zend Framework app run without that "Aborted" message.
GrumpyCanuck