See More

expectException(\InvalidArgumentException::class); Encoder::encode('test', 99); } public function testVersion7HasTypeNumber(): void { $matrix = Encoder::encode('A', ErrorCorrectionLevel::L, 7); $expected = 7 * 4 + 17; self::assertSame($expected, count($matrix)); } public function testEncodeUrl(): void { $matrix = Encoder::encode('https://example.com', ErrorCorrectionLevel::M); self::assertGreaterThanOrEqual(21, count($matrix)); } public function testDataOverflowThrows(): void { $this->expectException(\OverflowException::class); Encoder::encode(str_repeat('A', 500), ErrorCorrectionLevel::H, 1); } }