markTestSkipped( 'The GD extension is not available.' ); } } public function testImagePng() : void { $path = __DIR__ . '/c128b.png'; if (\file_exists($path)) { \unlink($path); } $img = new C128b('ABcdeFG0123+-!@?', 200, 50); $img->saveToPngFile($path); self::assertFileExists($path); } public function testImageJpg() : void { $path = __DIR__ . '/c128b.jpg'; if (\file_exists($path)) { \unlink($path); } $img = new C128b('ABcdeFG0123+-!@?', 200, 50); $img->saveToJpgFile($path); self::assertFileExists($path); } public function testOrientationAndMargin() : void { $path = __DIR__ . '/c128b_vertical.png'; if (\file_exists($path)) { \unlink($path); } $img = new C128b('ABcdeFG0123+-!@?', 50, 200, OrientationType::VERTICAL); $img->setMargin(2); $img->saveToPngFile($path); self::assertFileExists($path); } public function testValidString() : void { self::assertTrue(C128b::isValidString('ABCDE~FG0123+-')); } }