Home » Testing » PHPUnit » Bug #757
TestCase bug
Details
| Submitted | 2004-02-14 03:00 UTC |
|---|---|
| From | andy at harsani dot sk |
| Assigned | sebastian |
| Status | Closed |
| Package | PHPUnit |
| PHP Version | 5.0.0b4 (beta4) |
| OS | nt5.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