MDL-39563 Fixing mobilecssurl is not being returned in WebService, phpunit tests
authorJuan Leyva <juanleyvadelgado@gmail.com>
Thu, 11 Jul 2013 14:25:17 +0000 (16:25 +0200)
committerJuan Leyva <juanleyvadelgado@gmail.com>
Thu, 11 Jul 2013 14:25:17 +0000 (16:25 +0200)
webservice/externallib.php
webservice/tests/externallib_test.php

index 3b0990c..6eb7891 100644 (file)
@@ -156,8 +156,8 @@ class core_webservice_external extends external_api {
 
         $siteinfo['functions'] = $availablefunctions;
 
-        // Mobile CSS theme and alternative login url
-        $siteinfo['mobilecssurl'] = get_config(NULL, 'mobilecssurl');
+        // Mobile CSS theme and alternative login url.
+        $siteinfo['mobilecssurl'] = get_config(null, 'mobilecssurl');
 
         return $siteinfo;
     }
index 93b550e..75dbd99 100644 (file)
@@ -92,7 +92,7 @@ class core_webservice_external_testcase extends externallib_advanced_testcase {
         $this->assertEquals(true, $siteinfo['downloadfiles']);
         $this->assertEquals($CFG->release, $siteinfo['release']);
         $this->assertEquals($CFG->version, $siteinfo['version']);
-        $this->assertEquals(get_config('admin', 'mobilecssurl'), $siteinfo['mobilecssurl']);
+        $this->assertEquals(get_config(null, 'mobilecssurl'), $siteinfo['mobilecssurl']);
         $this->assertEquals(count($siteinfo['functions']), 1);
         $function = array_pop($siteinfo['functions']);
         $this->assertEquals($function['name'], 'core_course_get_contents');