From: umherirrender Date: Sat, 21 Mar 2015 08:41:13 +0000 (+0100) Subject: Set wgAutoloadAttemptLowercase = true for some AutoLoaderTests X-Git-Tag: 1.31.0-rc.0~12028^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/?a=commitdiff_plain;h=ff69e22a57b9b02e5d2c9488bcaae6f46d047c99;p=lhc%2Fweb%2Fwiklou.git Set wgAutoloadAttemptLowercase = true for some AutoLoaderTests 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 --- diff --git a/tests/phpunit/structure/AutoLoaderTest.php b/tests/phpunit/structure/AutoLoaderTest.php index 681b2d23cd..cde6547a69 100644 --- a/tests/phpunit/structure/AutoLoaderTest.php +++ b/tests/phpunit/structure/AutoLoaderTest.php @@ -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,