/** * @expectedException QueryPathException */ public function testNoRegistry() { QueryPathExtensionRegistry::$useRegistry = FALSE; try { qp(DATA_FILE)->stuble('arg1', 'arg2'); } catch (QueryPathException $e) { QueryPathExtensionRegistry::$useRegistry = TRUE; throw $e; } }
/** * Enable or disable automatic extension loading. * * If extension autoloading is disabled, then QueryPath will not * automatically load all registred extensions when a new QueryPath * object is created using {@link qp()}. */ public static function autoloadExtensions($boolean = TRUE) { self::$useRegistry = $boolean; }