/** * @expectedException Psy\Exception\ErrorException */ public function testNotHandlingErrors() { $shell = new Shell($this->getConfig()); $oldLevel = error_reporting(); error_reporting($oldLevel | E_USER_NOTICE); try { $shell->handleError(E_USER_NOTICE, 'wheee', null, 13); } catch (ErrorException $e) { error_reporting($oldLevel); throw $e; } }