acessor for MediaWikiTestCase::$useTemporaryTables
authorAntoine Musso <hashar@free.fr>
Mon, 18 Mar 2013 15:09:18 +0000 (16:09 +0100)
committerHashar <hashar@free.fr>
Mon, 18 Mar 2013 15:15:08 +0000 (15:15 +0000)
useTemporaryTables is marked private to prevent childs from overriding
the value which would cause a lot of madness whenever it forgot to reset
its status.  But that in turns prevents a child class from figuring out
whether we use temporary tables or not. The ActiveAbstract extension
test suite has such a requirement and hence need a proper accessor.

MediaWikiTestCase::usesTemporaryTables() is a public accessor to for the
private property MediaWikiTestCase::$useTemporaryTables.

Change-Id: I8016c49116a187d7523cc0d6190514f8a513eafb

tests/phpunit/MediaWikiTestCase.php

index 51fbff1..7e6e0ab 100644 (file)
@@ -123,6 +123,10 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
                }
        }
 
+       function usesTemporaryTables() {
+               return self::$useTemporaryTables;
+       }
+
        /**
         * obtains a new temporary file name
         *