public static function isUnguarded() { return static::$unguarded; }
public function testUnguardedCallDoesNotChangeUnguardedStateOnException() { try { Model::unguarded(function () { throw new Exception(); }); } catch (Exception $e) { // ignore the exception } $this->assertFalse(Model::isUnguarded()); }