[pkg-php-pear] Bug#684281: phpunit: Exits with return code 255 without displaying any error message when calling unknown method

Cyril Bouthors cyb at debian.org
Wed Aug 8 12:33:08 UTC 2012


Package: phpunit
Version: 3.6.10-1
Severity: important

Hi,

phpunit immediately exits with the error code 255 without displaying any error
message when calling an unknown method:

$ phpunit FootTest.php 
PHPUnit 3.6.10 by Sebastian Bergmann.

$ echo $?
255

Here is a minimal code that reproduces the issue:

$ cat FootTest.php 
<?php
class FooTest extends PHPUnit_Framework_TestCase
{
  function testFoo() {
    $foo->bar();
  }
}
?>

The same thing under squeeze + phpunit 3.4.14 works as expected:

cyb at squeeze:/tmp$ phpunit 1.php 
PHPUnit 3.4.14 by Sebastian Bergmann.

PHP Fatal error:  Call to a member function bar() on a non-object in /tmp/1.php
on line 7
cyb at squeeze:/tmp$ echo $?
255

The same thing in wheezy also seems to work:

cyb at wheezy:/tmp/x$ phpunit 1.php 
PHPUnit 3.6.10 by Sebastian Bergmann.

PHP Fatal error:  Call to a member function bar() on a non-object in /tmp/x/1.php on line 7
PHP Stack trace:
PHP   1. {main}() /usr/bin/phpunit:0
PHP   2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46
PHP   3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:130
PHP   4. PHPUnit_TextUI_TestRunner->doRun() /usr/share/php/PHPUnit/TextUI/Command.php:192
PHP   5. PHPUnit_Framework_TestSuite->run() /usr/share/php/PHPUnit/TextUI/TestRunner.php:325
PHP   6. PHPUnit_Framework_TestSuite->runTest() /usr/share/php/PHPUnit/Framework/TestSuite.php:745
PHP   7. PHPUnit_Framework_TestCase->run() /usr/share/php/PHPUnit/Framework/TestSuite.php:772
PHP   8. PHPUnit_Framework_TestResult->run() /usr/share/php/PHPUnit/Framework/TestCase.php:751
PHP   9. PHPUnit_Framework_TestCase->runBare() /usr/share/php/PHPUnit/Framework/TestResult.php:649
PHP  10. PHPUnit_Framework_TestCase->runTest() /usr/share/php/PHPUnit/Framework/TestCase.php:804
PHP  11. ReflectionMethod->invokeArgs() /usr/share/php/PHPUnit/Framework/TestCase.php:942
PHP  12. FooTest->testFoo() /usr/share/php/PHPUnit/Framework/TestCase.php:94


PHPUnit provides me with the messages needed to easily fix the issue under
squeeze and wheezy but not in sid...

Can you make sure errors are displayed in this case?

Please feel free to ask any question about my setup but I guess I have the
default configuration everywhere.

Regards,

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages phpunit depends on:
ii  pear-phpunit-channel  1.1-1
ii  php-codecoverage      1.1.2+dfsg1-2
ii  php-file-iterator     1.3.1-2
ii  php-pear              5.4.4-4
ii  php-symfony-yaml      1.0.6-1
ii  php-text-template     1.1.1-2
ii  php-timer             1.0.2-2
ii  php5-cli              5.4.4-4
ii  phpunit-mock-object   1.1.1-2

Versions of packages phpunit recommends:
ii  php-invoker       1.1.0-1
ii  php-token-stream  1.1.3-2
ii  phpunit-story     1.0.0-1

Versions of packages phpunit suggests:
pn  phpunit-dbunit    <none>
pn  phpunit-selenium  <none>

-- no debconf information
-- 
 ,''`.
: :' :      Cyril Bouthors
`. `'         Debian.org
  `-



More information about the pkg-php-pear mailing list