mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 10:26:40 +02:00
MDL-82207 phpunit: fix various @covers annotations (take#1)
This fixes various (not all) wrong @covers annotations that are reported as warnings by PHPUnit when it's run with code-coverage enabled. When possible, the preferred solution is to change to @covers at class level, that is the recommended way. If multiple classes are involved, then a mix of @coversDefaultClass and @covers at method level are used (always trying to use the minimum needed patch). This is the first of a series of issues created as sub-tasks of MDL-82142.
This commit is contained in:
parent
ad7fc69c25
commit
ad5fe71868
53 changed files with 75 additions and 128 deletions
|
@ -280,9 +280,6 @@ class api_test extends \advanced_testcase {
|
|||
|
||||
/**
|
||||
* Test the adding and removing of members from room.
|
||||
*
|
||||
* @covers ::add_members_to_room
|
||||
* @covers ::remove_members_from_room
|
||||
*/
|
||||
public function test_adding_and_removing_of_room_membership(): void {
|
||||
$course = $this->get_course();
|
||||
|
@ -311,8 +308,6 @@ class api_test extends \advanced_testcase {
|
|||
|
||||
/**
|
||||
* Test the update of room membership with the change user role.
|
||||
*
|
||||
* @covers ::update_room_membership
|
||||
*/
|
||||
public function test_update_room_membership_on_user_role_change(): void {
|
||||
global $DB;
|
||||
|
@ -340,8 +335,6 @@ class api_test extends \advanced_testcase {
|
|||
|
||||
/**
|
||||
* Test sync_provider method for the sync of available provider.
|
||||
*
|
||||
* @covers ::sync_provider
|
||||
*/
|
||||
public function test_sync_provider(): void {
|
||||
// Generate the data.
|
||||
|
@ -358,8 +351,6 @@ class api_test extends \advanced_testcase {
|
|||
|
||||
/**
|
||||
* Test the removal of all members from the room.
|
||||
*
|
||||
* @covers ::remove_all_members_from_room
|
||||
*/
|
||||
public function test_remove_all_members_from_room(): void {
|
||||
$course = $this->get_course();
|
||||
|
@ -382,8 +373,6 @@ class api_test extends \advanced_testcase {
|
|||
|
||||
/**
|
||||
* Test the configuration of room changes as well as the membership with the change of provider.
|
||||
*
|
||||
* @covers ::configure_room_and_membership_by_provider
|
||||
*/
|
||||
public function test_configure_room_and_membership_by_provider(): void {
|
||||
global $DB;
|
||||
|
|
|
@ -48,7 +48,9 @@ class processor_test extends \advanced_testcase {
|
|||
*
|
||||
* @covers ::create_instance
|
||||
* @covers ::get_id
|
||||
* @covers ::get_instance
|
||||
* @covers ::get_context
|
||||
* @covers ::get_context_id
|
||||
* @covers ::get_provider
|
||||
* @covers ::get_room_name
|
||||
*/
|
||||
public function test_create_instance(): void {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue