@covers PHPUnit_Framework_Assert::assertObjectHasAttribute
public function testObjectHasOnTheFlyAttribute() {
$obj = new StdClass();
$obj->foo = 'bar';
$this
->assertObjectHasAttribute('foo', $obj);
try {
$this
->assertObjectHasAttribute('bar', $obj);
} catch (PHPUnit_Framework_AssertionFailedError $e) {
return;
}
$this
->fail();
}