public function testInvalidHandler2()
{
$this->component->onMyEvent = array($this->component, 'nullHandler');
try {
$this->component->onMyEvent();
} catch (Exception $e) {
$this->assertInstanceOf('CException', $e);
$this->assertSame('Event "NewComponent.onmyevent" is attached with an invalid handler "nullHandler".', $e->getMessage());
}
}