+
+class TestPlatal extends Platal
+{
+ public function force_login(PlPage $page) {
+ throw new Exception('Force login called in a test');
+ }
+}
+class TestSession extends PlSession
+{
+ protected function doAuth($level) {
+ throw new Exception('Not implemented test method');
+ }
+
+ protected function makePerms($perms, $is_admin) {
+ throw new Exception('Not implemented test method');
+ }
+
+ protected function startSessionAs($user, $level) {
+ throw new Exception('Not implemented test method');
+ }
+
+ public function loggedLevel() {
+ return AUTH_MDP;
+ }
+
+ public function startAvailableAuth() {
+ return true;
+ }
+
+ public function sureLevel() {
+ return AUTH_MDP;
+ }
+
+ public function tokenAuth($login, $token) {
+ throw new Exception('Not implemented test method');
+ }
+}
+define('PL_GLOBALS_CLASS', 'PlGlobals');
+define('PL_SESSION_CLASS', 'TestSession');
+define('PL_PAGE_CLASS', 'PlPage');
+define('PL_LOGGER_CLASS', 'PlLogger');
+new TestPlatal();