-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
15 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,14 +31,14 @@ | |
* @copyright 2023 Odei Alba <[email protected]> | ||
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
class lib_test extends \externallib_advanced_testcase { | ||
final class lib_test extends \externallib_advanced_testcase { | ||
/** | ||
* Tests events after sortvoting is viewed. | ||
* | ||
* @covers ::sortvoting_view | ||
* @return void | ||
*/ | ||
public function test_sortvoting_view() { | ||
public function test_sortvoting_view(): void { | ||
global $CFG; | ||
|
||
$this->resetAfterTest(); | ||
|
@@ -76,7 +76,7 @@ public function test_sortvoting_view() { | |
* @covers ::mod_sortvoting_get_completion_active_rule_descriptions | ||
* @return void | ||
*/ | ||
public function test_mod_sortvoting_completion_get_active_rule_descriptions() { | ||
public function test_mod_sortvoting_completion_get_active_rule_descriptions(): void { | ||
$this->resetAfterTest(); | ||
$this->setAdminUser(); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ | |
* @copyright 2023 Odei Alba <[email protected]> | ||
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
class provider_test extends \core_privacy\tests\provider_testcase { | ||
final class provider_test extends \core_privacy\tests\provider_testcase { | ||
/** @var stdClass The student object. */ | ||
protected $student; | ||
|
||
|
@@ -92,7 +92,7 @@ protected function setUp(): void { | |
* Test for provider::get_metadata(). | ||
* @covers ::get_metadata | ||
*/ | ||
public function test_get_metadata() { | ||
public function test_get_metadata(): void { | ||
$collection = new collection('mod_sortvoting'); | ||
$newcollection = provider::get_metadata($collection); | ||
$itemcollection = $newcollection->get_collection(); | ||
|
@@ -114,7 +114,7 @@ public function test_get_metadata() { | |
* Test for provider::get_contexts_for_userid(). | ||
* @covers ::get_contexts_for_userid | ||
*/ | ||
public function test_get_contexts_for_userid() { | ||
public function test_get_contexts_for_userid(): void { | ||
$cm = get_coursemodule_from_instance('sortvoting', $this->sortvoting->id); | ||
|
||
$contextlist = provider::get_contexts_for_userid($this->student->id); | ||
|
@@ -128,7 +128,7 @@ public function test_get_contexts_for_userid() { | |
* Test for provider::export_user_data(). | ||
* @covers ::export_user_data | ||
*/ | ||
public function test_export_for_context() { | ||
public function test_export_for_context(): void { | ||
$cm = get_coursemodule_from_instance('sortvoting', $this->sortvoting->id); | ||
$cmcontext = \context_module::instance($cm->id); | ||
|
||
|
@@ -142,7 +142,7 @@ public function test_export_for_context() { | |
* Test for provider::delete_data_for_all_users_in_context(). | ||
* @covers ::delete_data_for_all_users_in_context | ||
*/ | ||
public function test_delete_data_for_all_users_in_context() { | ||
public function test_delete_data_for_all_users_in_context(): void { | ||
global $DB; | ||
|
||
$sortvoting = $this->sortvoting; | ||
|
@@ -190,7 +190,7 @@ public function test_delete_data_for_all_users_in_context() { | |
* Test for provider::delete_data_for_user(). | ||
* @covers ::delete_data_for_user | ||
*/ | ||
public function test_delete_data_for_user_() { | ||
public function test_delete_data_for_user(): void { | ||
global $DB; | ||
|
||
$sortvoting = $this->sortvoting; | ||
|
@@ -283,7 +283,7 @@ public function test_delete_data_for_user_() { | |
* Test for provider::get_users_in_context(). | ||
* @covers ::get_users_in_context | ||
*/ | ||
public function test_get_users_in_context() { | ||
public function test_get_users_in_context(): void { | ||
$cm = get_coursemodule_from_instance('sortvoting', $this->sortvoting->id); | ||
$cmcontext = \context_module::instance($cm->id); | ||
|
||
|
@@ -300,7 +300,7 @@ public function test_get_users_in_context() { | |
* Test for provider::get_users_in_context() with invalid context type. | ||
* @covers ::get_users_in_context | ||
*/ | ||
public function test_get_users_in_context_invalid_context_type() { | ||
public function test_get_users_in_context_invalid_context_type(): void { | ||
$systemcontext = \context_system::instance(); | ||
|
||
$userlist = new \core_privacy\local\request\userlist($systemcontext, 'mod_sortvoting'); | ||
|
@@ -313,7 +313,7 @@ public function test_get_users_in_context_invalid_context_type() { | |
* Test for provider::delete_data_for_users(). | ||
* @covers ::delete_data_for_users | ||
*/ | ||
public function test_delete_data_for_users() { | ||
public function test_delete_data_for_users(): void { | ||
global $DB; | ||
|
||
$sortvoting = $this->sortvoting; | ||
|