MDL-76583 core: Update uses of external_* classes
This commit is contained in:
+5
-12
@@ -14,6 +14,10 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use core_external\external_api;
|
||||
use core_external\external_function_parameters;
|
||||
use core_external\external_single_structure;
|
||||
|
||||
/**
|
||||
* An external function that throws an exception, for tests.
|
||||
*
|
||||
@@ -22,17 +26,6 @@
|
||||
* @copyright 2020 Dani Palou
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
require_once("$CFG->libdir/externallib.php");
|
||||
|
||||
/**
|
||||
* Create an external function that throws an exception, for tests.
|
||||
*
|
||||
* @copyright 2020 Dani Palou
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class test_external_function_throwable extends external_api {
|
||||
|
||||
/**
|
||||
@@ -58,7 +51,7 @@ class test_external_function_throwable extends external_api {
|
||||
/**
|
||||
* Returns description of throw_exception() result value.
|
||||
*
|
||||
* @return external_description
|
||||
* @return \core_external\external_description
|
||||
*/
|
||||
public static function throw_exception_returns() {
|
||||
return new external_single_structure(array());
|
||||
|
||||
Reference in New Issue
Block a user