19
19
use chillerlan \Settings \SettingsContainerInterface ;
20
20
use PHPUnit \Framework \TestCase ;
21
21
use Exception , Generator ;
22
- use function array_map , sprintf , str_repeat , substr ;
22
+ use function array_map , defined , sprintf , str_repeat , substr ;
23
23
24
24
/**
25
25
* Tests the QR Code reader
@@ -40,6 +40,11 @@ abstract class QRCodeReaderTestAbstract extends TestCase{
40
40
protected string $ FQN ;
41
41
42
42
protected function setUp ():void {
43
+
44
+ if (!defined ('READER_TEST_MAX_VERSION ' )){
45
+ $ this ::markTestSkipped ('READER_TEST_MAX_VERSION not defined (see phpunit.xml.dist) ' );
46
+ }
47
+
43
48
$ this ->options = new QROptions ;
44
49
$ this ->options ->readerUseImagickIfAvailable = false ;
45
50
}
@@ -117,7 +122,8 @@ public static function dataTestProvider():Generator{
117
122
$ str = str_repeat (self ::loremipsum, 5 );
118
123
$ eccLevels = array_map (fn (int $ ecc ):EccLevel => new EccLevel ($ ecc ), [EccLevel::L, EccLevel::M, EccLevel::Q, EccLevel::H]);
119
124
120
- for ($ v = 1 ; $ v <= 40 ; $ v ++){
125
+ /** @noinspection PhpUndefinedConstantInspection - see phpunit.xml.dist */
126
+ for ($ v = 1 ; $ v <= READER_TEST_MAX_VERSION ; $ v ++){
121
127
$ version = new Version ($ v );
122
128
123
129
foreach ($ eccLevels as $ eccLevel ){
0 commit comments