:octocat: extract RGBArrayModuleValueTrait

This commit is contained in:
smiley
2024-05-06 23:18:27 +02:00
parent de3d321b00
commit 74dc3b2dbf
6 changed files with 117 additions and 106 deletions
+1 -11
View File
@@ -20,6 +20,7 @@ use function extension_loaded;
* Tests the QRGdImage output module
*/
abstract class QRGdImageTestAbstract extends QROutputTestAbstract{
use RGBArrayModuleValueProviderTrait;
/**
* @inheritDoc
@@ -33,17 +34,6 @@ abstract class QRGdImageTestAbstract extends QROutputTestAbstract{
parent::setUp();
}
public static function moduleValueProvider():array{
return [
'valid: int' => [[123, 123, 123], true],
'valid: w/invalid extra element' => [[123, 123, 123, 'abc'], true],
'valid: numeric string' => [['123', '123', '123'], true],
'invalid: wrong type' => ['foo', false],
'invalid: array too short' => [[1, 2], false],
'invalid: contains non-number' => [[1, 'b', 3], false],
];
}
/**
* @inheritDoc
*/