From a4dbc1de805978287f4c0bfb0c0a57e4f9c8f20f Mon Sep 17 00:00:00 2001 From: Jun Pataleta Date: Thu, 13 Dec 2018 15:07:24 +0800 Subject: [PATCH] MDL-64285 core: Skip 64 bits check for 32-bit PHP versions in unit tests --- lib/tests/environment_test.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/tests/environment_test.php b/lib/tests/environment_test.php index 63498cad81e..f422cbe193e 100644 --- a/lib/tests/environment_test.php +++ b/lib/tests/environment_test.php @@ -84,6 +84,10 @@ class core_environment_testcase extends advanced_testcase { if (in_array($result->info, $sslmessages)) { $this->markTestSkipped('Up-to-date TLS libraries are not necessary for unit testing.'); } + if ($result->info === 'php not 64 bits' && PHP_INT_SIZE == 4) { + // If we're on a 32-bit system, skip 64-bit check. 32-bit PHP has PHP_INT_SIZE set to 4. + $this->markTestSkipped('64-bit check is not necessary for unit testing.'); + } } $info = "{$result->part}:{$result->info}"; $this->assertTrue($result->getStatus(), "Problem detected in environment ($info), fix all warnings and errors!"); -- 2.43.0