phpspec/phpspec — Issue #73: Direct property access was not properly intercepted
Author: andho
Created: 2012-02-11 14:27:45+00:00
State: open

Consider the following test.

$object = new $this->spec(new TestSubject());

$object->testProperty->should->be('Default Value');

The code above caused the following error:

PHP Notice: Trying to get property of non-object

Because the interceptor was not returning an object but the value of $object->testProperty.