Renamed a classes function "update_service"
Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
		@@ -216,7 +216,7 @@ final class api {
 | 
			
		||||
     * @throws \coding_exception
 | 
			
		||||
     * @throws \dml_exception
 | 
			
		||||
     */
 | 
			
		||||
    public static function update_service(record $service): bool {
 | 
			
		||||
    public static function set_service(record $service): bool {
 | 
			
		||||
        global $DB;
 | 
			
		||||
 | 
			
		||||
        $result = $DB->update_record(LW_TABLE_SERVICES, $service);
 | 
			
		||||
 
 | 
			
		||||
@@ -326,7 +326,7 @@ final class local_webhooks_api_testcase extends advanced_testcase {
 | 
			
		||||
        $record2 = self::get_random_record();
 | 
			
		||||
 | 
			
		||||
        $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);
 | 
			
		||||
        $services = $DB->get_records(LW_TABLE_SERVICES);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user