See More

expectException(\InvalidArgumentException::class); MaskPattern::getMask(99, 0, 0); } public function testGetLostPointReturnsPositiveValue(): void { $size = 21; $modules = []; for ($r = 0; $r < $size; $r++) { for ($c = 0; $c < $size; $c++) { $modules[$r][$c] = ($r + $c) % 2 === 0; } } $lostPoint = MaskPattern::getLostPoint($modules, $size); self::assertGreaterThanOrEqual(0, $lostPoint); } }