MDL-83468 phpunit: Skip tests instead of data providers

Empty data providers are invalid and do not represent the state of the
test. Rather than commenting them out we should instead skip them.
This commit is contained in:
Andrew Nicols
2025-01-20 16:47:55 +01:00
committed by Sara Arjona
parent cb63d29ace
commit 118b3ccf46
2 changed files with 3 additions and 11 deletions
-5
View File
@@ -167,11 +167,6 @@ final class compressor_test extends \advanced_testcase {
* @return array
*/
public static function provider_for_tests_setget(): array {
if (!cachestore_redis::are_requirements_met()) {
// Even though we skip all tests in this case, this provider can still show warnings about non-existing class.
return [];
}
$data = [
['none, none',
\Redis::SERIALIZER_NONE, cachestore_redis::COMPRESSOR_NONE,
+3 -6
View File
@@ -40,7 +40,7 @@ final class rtlcss_test extends basic_testcase {
*/
public static function background_image_provider(): array {
return [
/* Not supported by MoodleHQ/RTLCSS yet.
// Not supported by MoodleHQ/RTLCSS yet.
[[
'should' => 'Should process string map in url (processUrls:true)',
'expected' => 'div { background-image: url(images/rtl.png), url(images/right.png);}',
@@ -70,7 +70,6 @@ final class rtlcss_test extends basic_testcase {
'reversable' => true,
'skip' => true
]]
*/
];
}
@@ -421,7 +420,7 @@ final class rtlcss_test extends basic_testcase {
*/
public static function special_provider(): array {
return [
/* Not supported by MoodleHQ/RTLCSS yet.
// Not supported by MoodleHQ/RTLCSS yet.
[[
'should' => 'Should not negate tokens',
'expected' => 'div { box-shadow: rgba(0, 128, 128, .98) inset -5em 1em 0;}',
@@ -429,7 +428,6 @@ final class rtlcss_test extends basic_testcase {
'reversable' => true,
'skip' => true,
]]
*/
];
}
@@ -614,7 +612,7 @@ final class rtlcss_test extends basic_testcase {
*/
public static function transforms_provider(): array {
return [
/* Not supported by MoodleHQ/RTLCSS yet.
// Not supported by MoodleHQ/RTLCSS yet.
[[
'should' => 'Should mirror transform : matrix',
'expected' => 'div { transform: matrix(2, 0.1, 20.75, 2, 2, 2); }',
@@ -888,7 +886,6 @@ final class rtlcss_test extends basic_testcase {
'reversable' => false,
'skip' => true
]]
*/
];
}