From ff69e22a57b9b02e5d2c9488bcaae6f46d047c99 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Sat, 21 Mar 2015 09:41:13 +0100 Subject: [PATCH] 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 --- tests/phpunit/structure/AutoLoaderTest.php | 4 ++++ 1 file changed, 4 insertions(+) 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, -- 2.20.1