PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

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