public function registrationAndDeregistration()
{
$calls = (object) array('retval' => true);
$assertAble = function ($className) use(&$calls) {
$calls->log[] = array($className);
$calls->count[$className] = 1 + @$calls->count[$className];
return $calls->retval;
};
$handler = $this->create($assertAble);
$this->assertTrue($handler->isEnabled());
$this->assertTrue($handler->__invoke("Fake"));
$handler->unregister();
$this->assertFalse($handler->__invoke("Fake"));
$this->assertEquals(1, $calls->count['Fake']);
}