Set wgAutoloadAttemptLowercase = true for some AutoLoaderTests
authorumherirrender <umherirrender_de.wp@web.de>
Sat, 21 Mar 2015 08:41:13 +0000 (09:41 +0100)
committerumherirrender <umherirrender_de.wp@web.de>
Sat, 21 Mar 2015 08:42:23 +0000 (09:42 +0100)
Avoids:
1) AutoLoaderTest::testWrongCaseClass
Failed asserting that false is true.

2) AutoLoaderTest::testWrongCaseSerializedClass
unserialize() can load classes case-insensitively.
Failed asserting that true is false.

Change-Id: Ic5c271906fb9b2e27639aa8ecfc04ffe6788d3eb

tests/phpunit/structure/AutoLoaderTest.php

index 681b2d2..cde6547 100644 (file)
@@ -130,10 +130,14 @@ class AutoLoaderTest extends MediaWikiTestCase {
        }
 
        function testWrongCaseClass() {
+               $this->setMwGlobals( 'wgAutoloadAttemptLowercase', true );
+
                $this->assertTrue( class_exists( 'testautoLoadedcamlCLASS' ) );
        }
 
        function testWrongCaseSerializedClass() {
+               $this->setMwGlobals( 'wgAutoloadAttemptLowercase', true );
+
                $dummyCereal = 'O:29:"testautoloadedserializedclass":0:{}';
                $uncerealized = unserialize( $dummyCereal );
                $this->assertFalse( $uncerealized instanceof __PHP_Incomplete_Class,