PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Testing » PHPUnit » Bug #757

TestCase bug

Details

Submitted2004-02-14 03:00 UTC
Fromandy at harsani dot sk
Assignedsebastian
StatusClosed
PackagePHPUnit
PHP Version5.0.0b4 (beta4)
OSnt5.1
Roadmaps(Not assigned)

Comments

[2004-02-14 03:00 UTC] andy at harsani dot sk

Description:
------------
test methods are invoked on different instance.

TestCase.php l.178
<< $method->invoke(new $class->name);
<< $method->invoke($this);

Reproduce code:
---------------
class TestTestCase extends PHPUnit_Framework_TestCase {
private $_foo;

function setUp() {
$this->_foo = 'foo';
}

function testTest() {
$this->assertEquals('bar', $this->_foo);
}
}

Expected result:
----------------
FAILURE

Actual result:
--------------
OK