Revision: 9227
http://sourceforge.net/p/phpwiki/code/9227
Author: vargenau
Date: 2014-10-08 12:53:10 +0000 (Wed, 08 Oct 2014)
Log Message:
-----------
Remove ENABLE_USER_NEW
Modified Paths:
--------------
trunk/tests/unit/combine_define.pl
trunk/tests/unit/runme_mem
trunk/tests/unit/test.php
Modified: trunk/tests/unit/combine_define.pl
===================================================================
--- trunk/tests/unit/combine_define.pl 2014-10-08 12:49:20 UTC (rev 9226)
+++ trunk/tests/unit/combine_define.pl 2014-10-08 12:53:10 UTC (rev 9227)
@@ -8,7 +8,7 @@
$prefix = shift || 'all';
# @DEF should match the runme_mem tests:
# WIKIDB_NOCACHE_MARKUP ENABLE_PAGEPERM
-@DEF = qw/ USECACHE ENABLE_USER_NEW /;
+@DEF = qw/ USECACHE /;
for $def (@DEF) {
for $bool (qw/true false/) {
$fn = sprintf("%s_%s_%s.data",$prefix,$def,$bool);
Modified: trunk/tests/unit/runme_mem
===================================================================
--- trunk/tests/unit/runme_mem 2014-10-08 12:49:20 UTC (rev 9226)
+++ trunk/tests/unit/runme_mem 2014-10-08 12:53:10 UTC (rev 9227)
@@ -17,7 +17,7 @@
chmod +x prepare_pl combine_define.pl
today=`date`
-for define in USECACHE ENABLE_USER_NEW; do
+for define in USECACHE; do
file1="${prefix}_${define}_true"
file2="${prefix}_${define}_false"
php -Cq -d register_argc_argv=1 test.php -d${define}=true level=2 debug=9 db=$db $tests | tee ${file1}.result
Modified: trunk/tests/unit/test.php
===================================================================
--- trunk/tests/unit/test.php 2014-10-08 12:49:20 UTC (rev 9226)
+++ trunk/tests/unit/test.php 2014-10-08 12:53:10 UTC (rev 9227)
@@ -36,7 +36,6 @@
//TODO: let the user decide which constants to use: define="x=y"
//define('USE_DB_SESSION', false);
-//define('ENABLE_USER_NEW', false);
// memory usage: (8MB limit on certain servers)
// setupwiki
@@ -497,7 +496,7 @@
if ($debug_level & 9) {
// which constants affect memory?
foreach (explode(",","USECACHE,WIKIDB_NOCACHE_MARKUP,"
- ."ENABLE_USER_NEW,ENABLE_PAGEPERM") as $v) {
+ ."ENABLE_PAGEPERM") as $v) {
printConstant($v);
}
}
@@ -523,38 +522,17 @@
}
}
-if (ENABLE_USER_NEW) {
- class MockUser extends _WikiUser {
- function MockUser($name, $level) {
- $this->_userid = $name;
- $this->_isSignedIn = $level > 1;
- $this->_level = $level;
- }
- function isSignedIn() {
- return $this->_isSignedIn;
- }
+class MockUser extends _WikiUser {
+ function MockUser($name, $level) {
+ $this->_userid = $name;
+ $this->_isSignedIn = $level > 1;
+ $this->_level = $level;
}
-} else {
- class MockUser extends WikiUser {
- function MockUser($name, $level) {
- $this->_userid = $name;
- $this->_isSignedIn = $level > 1;
- $this->_level = $level;
- }
- function isSignedIn() {
- return $this->_isSignedIn;
- }
+ function isSignedIn() {
+ return $this->_isSignedIn;
}
}
-/*
-if (ENABLE_USER_NEW)
- $request->_user = WikiUser('AnonUser');
-else {
- $request->_user = new WikiUser($request, 'AnonUser');
- $request->_prefs = $request->_user->getPreferences();
-}
-*/
if (DEBUG & _DEBUG_TRACE)
printMemoryUsage("PhpWikiLoaded");
@@ -620,10 +598,6 @@
echo "Testing DB Backend \"$dbtype\" ...\n";
flush();
$request = new MockRequest($DBParams);
- if ( ! ENABLE_USER_NEW ) {
- $request->_user->_request =& $request;
- $request->_user->_dbi =& $request->_dbi;
- }
if (DEBUG & _DEBUG_TRACE)
printMemoryUsage("PhpWikiInitialized");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|