From e84ac6859a9eebe185b44ddb7ee44eafdfff5be1 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Fri, 10 May 2019 15:22:48 +0400 Subject: Renamed a classes function "delete_service" Signed-off-by: Valentin Popov --- classes/local/api.php | 2 +- tests/api_test.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/local/api.php b/classes/local/api.php index eedcdbd..eb713e4 100644 --- a/classes/local/api.php +++ b/classes/local/api.php @@ -81,7 +81,7 @@ final class api { * * @throws \dml_exception */ - public static function delete_service(int $id): bool { + public static function del_service(int $id): bool { global $DB; $DB->delete_records(LW_TABLE_EVENTS, ['serviceid' => $id]); diff --git a/tests/api_test.php b/tests/api_test.php index cd6ef6e..2da6a3d 100644 --- a/tests/api_test.php +++ b/tests/api_test.php @@ -118,7 +118,7 @@ final class local_webhooks_api_testcase extends advanced_testcase { $record = self::get_random_record(); $record->id = api::add_service($record); - self::assertTrue(api::delete_service($record->id)); + self::assertTrue(api::del_service($record->id)); self::assertCount(0, $DB->get_records(LW_TABLE_EVENTS)); self::assertCount(0, $DB->get_records(LW_TABLE_SERVICES)); } -- cgit v1.2.3