-
Notifications
You must be signed in to change notification settings - Fork 5
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
12 additions
and
12 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
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,7 +31,7 @@ | |
* @copyright 2016 Davo Smith, Synergy Learning UK on behalf of Alexander Bias, Ulm University <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
class rules_test extends \advanced_testcase { | ||
final class rules_test extends \advanced_testcase { | ||
|
||
/** @var int[] mapping user profile field shortname => field id */ | ||
protected $fieldids = []; | ||
|
@@ -75,7 +75,7 @@ public function setUp(): void { | |
* It is adopted from block_html and does not have a coverage tag there either. Thus, we set coversNothing. | ||
* @coversNothing | ||
*/ | ||
public function test_create_rules() { | ||
public function test_create_rules(): void { | ||
// Create a 'checkbox' rule. | ||
$ruledata = (object) [ | ||
'fieldid' => $this->fieldids['checkboxfield'], 'datatype' => 'checkbox', | ||
|
@@ -152,7 +152,7 @@ public function test_create_rules() { | |
* It is adopted from block_html and does not have a coverage tag there either. Thus, we set coversNothing. | ||
* @coversNothing | ||
*/ | ||
public function test_update_rule() { | ||
public function test_update_rule(): void { | ||
// Create a 'text' rule. | ||
$ruledata = (object) [ | ||
'fieldid' => $this->fieldids['textfield'], 'datatype' => 'text', | ||
|
@@ -197,7 +197,7 @@ public function test_update_rule() { | |
* It is adopted from block_html and does not have a coverage tag there either. Thus, we set coversNothing. | ||
* @coversNothing | ||
*/ | ||
public function test_delete_rule() { | ||
public function test_delete_rule(): void { | ||
// Create a 'text' rule. | ||
$ruledata = (object) [ | ||
'fieldid' => $this->fieldids['textfield'], 'datatype' => 'text', | ||
|
@@ -235,7 +235,7 @@ public function test_delete_rule() { | |
* It is adopted from block_html and does not have a coverage tag there either. Thus, we set coversNothing. | ||
* @coversNothing | ||
*/ | ||
public function test_update_from_form_data() { | ||
public function test_update_from_form_data(): void { | ||
// Create a 'text' rule + reload. | ||
$ruledata = (object) [ | ||
'fieldid' => $this->fieldids['textfield'], 'datatype' => 'text', | ||
|
@@ -329,7 +329,7 @@ public function test_update_from_form_data() { | |
* It is adopted from block_html and does not have a coverage tag there either. Thus, we set coversNothing. | ||
* @coversNothing | ||
*/ | ||
public function test_match_checkbox() { | ||
public function test_match_checkbox(): void { | ||
global $DB; | ||
// Set up 3 users: | ||
// user1 has profile field unchecked. | ||
|
@@ -373,7 +373,7 @@ public function test_match_checkbox() { | |
* It is adopted from block_html and does not have a coverage tag there either. Thus, we set coversNothing. | ||
* @coversNothing | ||
*/ | ||
public function test_match_menu() { | ||
public function test_match_menu(): void { | ||
global $DB; | ||
// Set up 3 users: | ||
// user1 has profile field 'Opt 1'. | ||
|
@@ -417,7 +417,7 @@ public function test_match_menu() { | |
* It is adopted from block_html and does not have a coverage tag there either. Thus, we set coversNothing. | ||
* @coversNothing | ||
*/ | ||
public function test_match_text() { | ||
public function test_match_text(): void { | ||
global $DB; | ||
// Set up 3 users: | ||
// user1 has profile field 'Testing ABC'. | ||
|
@@ -503,7 +503,7 @@ public function test_match_text() { | |
* It is adopted from block_html and does not have a coverage tag there either. Thus, we set coversNothing. | ||
* @coversNothing | ||
*/ | ||
public function test_and_rules() { | ||
public function test_and_rules(): void { | ||
global $DB; | ||
|
||
// Set up a user with 'menufield' set to 'Opt 1', 'checkboxfield' set to 'No', 'textfield' set to 'Fred'. | ||
|