mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-10-09 05:15:49 +00:00
:octocat: extract RGBArrayModuleValueTrait
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user