Index: trunk/phase3/maintenance/tests/phpunit/includes/TitlePermissionTest.php |
— | — | @@ -12,7 +12,9 @@ |
13 | 13 | function setUp() { |
14 | 14 | global $wgLocaltimezone, $wgLocalTZoffset, $wgMemc, $wgContLang, $wgLang, $wgMessageCache; |
15 | 15 | |
16 | | - $wgMemc = new FakeMemCachedClient; |
| 16 | + if(!$wgMemc) { |
| 17 | + $wgMemc = new FakeMemCachedClient; |
| 18 | + } |
17 | 19 | $wgMessageCache = new MessageCache( $wgMemc, true, 3600 ); |
18 | 20 | $wgContLang = $wgLang = Language::factory( 'en' ); |
19 | 21 | |
— | — | @@ -45,8 +47,8 @@ |
46 | 48 | } |
47 | 49 | |
48 | 50 | function tearDown() { |
49 | | - global $wgMemc, $wgContLang, $wgLang; |
50 | | - $wgMemc = $wgContLang = $wgLang = null; |
| 51 | + global $wgContLang, $wgLang; |
| 52 | + $wgContLang = $wgLang = null; |
51 | 53 | } |
52 | 54 | |
53 | 55 | function setUserPerm( $perm ) { |