public function testClearingInvalidCache() { $this->setExpectedException('Exception'); Orm::configure('caching', true); Orm::configure('caching_driver', 'invalid'); try { ORM::forTable('widget')->where('name', 'Fred')->where('age', 17)->findOne(); } catch (Exception $e) { Orm::clearCache(); } }