Renamed a classes function "delete_service"
Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
		@@ -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]);
 | 
			
		||||
 
 | 
			
		||||
@@ -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));
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user