/**
  * QRCode 2D Matrix-Code PNG rendering test
  *
  * @covers BG\BarcodeBundle\Util\Base2DBarcode::getBarcodePNGPath();
  */
 public function testQRCODEGetBarcodePNGPath()
 {
     $d2 = new matrixCode();
     $d2->savePath = self::C_TMP_PATH;
     $bcPathAbs = $d2->getBarcodePNGPath(self::C_MC_DEFAULT, 'qrcode', self::C_MC_2D_WIDTH, self::C_MC_2D_HEIGHT);
     if (function_exists('imagecreate')) {
         $checkCondition = file_exists($bcPathAbs) && (filesize($bcPathAbs) > 225 && filesize($bcPathAbs) < 255);
     } else {
         $checkCondition = file_exists($bcPathAbs) ? true : false;
     }
     if ($bcPathAbs !== false) {
         unlink($bcPathAbs);
     }
     $this->assertTrue($checkCondition);
 }
Exemple #2
0
        <script src="js/vendor/modernizr-2.6.2.min.js"></script>
    </head>
    <body>
        <!--[if lt IE 7]>
            <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
        <![endif]-->

        <div class="page-wrapper">

            <h1>2D BARCODES, ImageMode</h1>

            <div class="barcode-block">
                <h1>PDF417 2D Code</h1>
                <p>PDF417 (ISO/IEC 15438:2006)</p>
                <img src="/tmp/<?php 
echo $bc2d->getBarcodeFilenameFromGenPath($bc2d->getBarcodePNGPath('hello world!', 'pdf417', 2, 1.75));
?>
" alt="PDF417 barcode" title="PDF417 Barcode Image">
                <h2>hello world!</h2>
            </div>

            <div class="barcode-block">
                <h1>DATAMATRIX 2D Code</h1>
                <p>Datamatrix (ISO/IEC 16022)</p>
                <img src="/tmp/<?php 
echo $bc2d->getBarcodeFilenameFromGenPath($bc2d->getBarcodePNGPath('hello world!', 'datamatrix', 4, 4));
?>
" alt="DATAMATRIX barcode" title="DATAMATRIX Barcode Image">
                <h2>hello world!</h2>
            </div>