=')) ? 'PHPUnit/Autoload.php' : 'PHPUnit/Framework.php'; use PHPUnit\Framework\TestCase; abstract class TikiTestCase extends TestCase { protected $backupGlobals = false; protected function ensureDefaultGalleryExists() { $filegallib = TikiLib::lib('filegal'); $info = $filegallib->get_file_gallery_info(1); if (! $info) { if (! isset($GLOBALS['user'])) { $GLOBALS['user'] = ''; } $galleryId = $filegallib->replace_file_gallery( [ 'name' => 'Default Gallery', 'description' => 'Default Gallery', ] ); $filegallib->query("UPDATE tiki_file_galleries SET galleryId = 1 WHERE galleryId = ?", [$galleryId]); } } protected function setPageRegex() { global $page_regex; // we must set the page regex, otherwise the links get not parsed // taken from: 'lib/setup/wiki.php' with $prefs['wiki_page_regex'] == 'full' $page_regex = '([A-Za-z0-9_]|[\x80-\xFF])([\.: A-Za-z0-9_\-]|[\x80-\xFF])*([A-Za-z0-9_]|[\x80-\xFF])'; } }