sebastianbergmann/phpunit-mock-objects — Issue #73: AbstractMocking does not work as expected
Author: drak
Created: 2011-12-09 17:11:44+00:00
State: open

It would appear, from my test case at last that `getMockForAbstractClass()` is not working.

If I have the following which fails

```
abstract class Foo
{
public function t()
{
return 2;
}
}

public function testT()
{
// Create a stub for the abstract class.
$stub = $this->getMockForAbstractClass('Foo');

// Configure the stub.
$stub->expects($this->any())
->method('t')
->will($this->returnValue(4));

$this->assertEquals(4, $stub->t());
}
```

If I change the Foo class to concrete and the stub to `$this->getMock('Foo')` then it works as expected.

Am I doing something wrong or is this a bug?