mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-24 20:47:57 +00:00
🚿 move and exclude test traits
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* RGBArrayModuleValueProviderTrait.php
|
||||
*
|
||||
* @created 06.05.2024
|
||||
* @author smiley <smiley@chillerlan.net>
|
||||
* @copyright 2024 smiley
|
||||
* @license MIT
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace chillerlan\QRCodeTest\Traits;
|
||||
|
||||
/**
|
||||
* A data provider for use in tests that include RGBArrayModuleValueTrait
|
||||
*
|
||||
* @see \chillerlan\QRCode\Output\RGBArrayModuleValueTrait
|
||||
*/
|
||||
trait RGBArrayModuleValueProviderTrait{
|
||||
|
||||
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],
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user