Renamed a classes function "update_service"

Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
Valentin Popov 2019-05-10 15:20:56 +04:00
parent db2d98d210
commit e550237b4b
Signed by: Valentin Popov
GPG Key ID: 269A00ACA90A8EA3
2 changed files with 2 additions and 2 deletions

View File

@ -216,7 +216,7 @@ final class api {
* @throws \coding_exception * @throws \coding_exception
* @throws \dml_exception * @throws \dml_exception
*/ */
public static function update_service(record $service): bool { public static function set_service(record $service): bool {
global $DB; global $DB;
$result = $DB->update_record(LW_TABLE_SERVICES, $service); $result = $DB->update_record(LW_TABLE_SERVICES, $service);

View File

@ -326,7 +326,7 @@ final class local_webhooks_api_testcase extends advanced_testcase {
$record2 = self::get_random_record(); $record2 = self::get_random_record();
$record2->id = api::add_service($record1); $record2->id = api::add_service($record1);
self::assertTrue(api::update_service($record2)); self::assertTrue(api::set_service($record2));
$events = $DB->get_records(LW_TABLE_EVENTS); $events = $DB->get_records(LW_TABLE_EVENTS);
$services = $DB->get_records(LW_TABLE_SERVICES); $services = $DB->get_records(LW_TABLE_SERVICES);