From 33d65f705b4cb18c2ddea12402c1d12eae00ea3d Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Wed, 25 Mar 2015 03:09:24 +0100 Subject: [PATCH] MDL-49425 webservices: Fix unit test dependent of php.ini --- webservice/tests/externallib_test.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webservice/tests/externallib_test.php b/webservice/tests/externallib_test.php index 9e1b0a9eb34..6bb606195e6 100644 --- a/webservice/tests/externallib_test.php +++ b/webservice/tests/externallib_test.php @@ -119,7 +119,9 @@ class core_webservice_externallib_testcase extends externallib_advanced_testcase } $this->assertEquals($userquota, $siteinfo['userquota']); - $this->assertEquals($maxbytes, $siteinfo['usermaxuploadfilesize']); + // We can use the function for the expectation because USER_CAN_IGNORE_FILE_SIZE_LIMITS is + // covered below for admin user. This test is for user not allowed to ignore limits. + $this->assertEquals(get_max_upload_file_size($maxbytes), $siteinfo['usermaxuploadfilesize']); $this->assertEquals(true, $siteinfo['usercanmanageownfiles']); // Now as admin.