MDL-81521 core: Update all possibly data providers to be static
Note: Some data providers could not be automatically be converted to being static. These will be handled in a separate issue.
This commit is contained in:
@@ -2070,7 +2070,7 @@ class accesslib_test extends advanced_testcase {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function deprecated_capabilities_use_cases() {
|
||||
public static function deprecated_capabilities_use_cases(): array {
|
||||
return [
|
||||
'capability missing' => [
|
||||
'fake/access:missingcapability',
|
||||
@@ -3076,7 +3076,7 @@ class accesslib_test extends advanced_testcase {
|
||||
$this->assertEquals(1, count_enrolled_users($coursecontext, '', $groupids));
|
||||
}
|
||||
|
||||
public function get_enrolled_sql_provider() {
|
||||
public static function get_enrolled_sql_provider(): array {
|
||||
return array(
|
||||
array(
|
||||
// Two users who are enrolled.
|
||||
@@ -4619,7 +4619,7 @@ class accesslib_test extends advanced_testcase {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_get_with_capability_join_override_cases() {
|
||||
public static function get_get_with_capability_join_override_cases(): array {
|
||||
return [
|
||||
'no overrides' => [true, []],
|
||||
'one override' => [true, ['moodle/course:viewscales']],
|
||||
@@ -4821,7 +4821,7 @@ class accesslib_test extends advanced_testcase {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function is_parent_of_provider(): array {
|
||||
public static function is_parent_of_provider(): array {
|
||||
$provideboth = function(string $desc, string $contextpath, string $testpath, bool $expected): array {
|
||||
return [
|
||||
"includeself: true; {$desc}" => [
|
||||
@@ -4922,7 +4922,7 @@ class accesslib_test extends advanced_testcase {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function is_child_of_provider(): array {
|
||||
public static function is_child_of_provider(): array {
|
||||
$provideboth = function(string $desc, string $contextpath, string $testpath, bool $expected): array {
|
||||
return [
|
||||
"includeself: true; {$desc}" => [
|
||||
|
||||
Reference in New Issue
Block a user