Follow up r79109. Do not use create_function.
authorPlatonides <platonides@users.mediawiki.org>
Thu, 30 Dec 2010 16:24:29 +0000 (16:24 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Thu, 30 Dec 2010 16:24:29 +0000 (16:24 +0000)
tests/phpunit/MediaWikiTestCase.php

index d58ebc8..71b8d2a 100644 (file)
@@ -165,11 +165,16 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
                }
        }
        
+       static private function unprefixTable( $tableName ) {
+               global $wgDBprefix;
+               return substr( $tableName, strlen( $wgDBprefix ) );
+       }
+
        protected function listTables() {
                global $wgDBprefix;
                
                $tables = $this->db->listTables( $wgDBprefix, __METHOD__ );
-               $tables = array_map( create_function( '$table', 'global $wgDBprefix; return substr( $table, strlen( $wgDBprefix ) );' ), $tables );
+               $tables = array_map( array( __CLASS__, 'unprefixTable' ), $tables );
                return $tables;
                
        }