Renamed a classes function "delete_service"
Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
parent
e550237b4b
commit
e84ac6859a
@ -81,7 +81,7 @@ final class api {
|
|||||||
*
|
*
|
||||||
* @throws \dml_exception
|
* @throws \dml_exception
|
||||||
*/
|
*/
|
||||||
public static function delete_service(int $id): bool {
|
public static function del_service(int $id): bool {
|
||||||
global $DB;
|
global $DB;
|
||||||
|
|
||||||
$DB->delete_records(LW_TABLE_EVENTS, ['serviceid' => $id]);
|
$DB->delete_records(LW_TABLE_EVENTS, ['serviceid' => $id]);
|
||||||
|
@ -118,7 +118,7 @@ final class local_webhooks_api_testcase extends advanced_testcase {
|
|||||||
$record = self::get_random_record();
|
$record = self::get_random_record();
|
||||||
$record->id = api::add_service($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_EVENTS));
|
||||||
self::assertCount(0, $DB->get_records(LW_TABLE_SERVICES));
|
self::assertCount(0, $DB->get_records(LW_TABLE_SERVICES));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user