🚿 allow testing of specific patterns

This commit is contained in:
codemasher
2020-04-03 20:12:44 +02:00
parent c01660f4a5
commit a8aad88979
2 changed files with 12 additions and 8 deletions
+7 -2
View File
@@ -21,10 +21,15 @@ class MaskPatternTesterTest extends QRTestAbstract{
// coverage
public function testMaskpattern():void{
$matrix = (new Byte(new QROptions(['version' => 10]), 'test'))->initMatrix(0, true);
$dataInterface = new Byte(new QROptions(['version' => 10]), 'test');
$this::assertSame(6178, (new MaskPatternTester($matrix))->testPattern());
$this::assertSame(4, (new MaskPatternTester($dataInterface))->getBestMaskPattern());
}
public function testMaskpatternID():void{
$dataInterface = new Byte(new QROptions(['version' => 10]), 'test');
$this::assertSame(6178, (new MaskPatternTester($dataInterface))->testPattern(0));
}
}