/**
  * I25 Barcode PNG rendering test (rotation
  *
  * @covers BG\BarcodeBundle\Util\Base1DBarcode::getBarcodePNGPath();
  */
 public function testI25GetBarcodePNGPathVertical()
 {
     $d1 = new barCode();
     $d1->savePath = self::C_TMP_PATH;
     $bcPathAbs = $d1->getBarcodePNGPath(self::C_BC_DEFAULT, 'I25', self::C_BC_1D_WIDTH, self::C_BC_1D_HEIGHT, array(0, 0, 0), true);
     $checkCondition = file_exists($bcPathAbs) ? true : false;
     if (function_exists('imagecreate')) {
         $checkCondition = file_exists($bcPathAbs) && filesize($bcPathAbs) >= 217;
     }
     if ($bcPathAbs !== false) {
         unlink($bcPathAbs);
     }
     $this->assertTrue($checkCondition);
 }
Example #2
0
<?php

namespace BG\Barcode;

include_once '../Base1DBarcode.php';
include_once '../Base2DBarcode.php';
use BG\Barcode\Base1DBarcode as BarCode1D;
use BG\Barcode\Base2DBarcode as BarCode2D;
$bc1d = new BarCode1D();
$bc2d = new BarCode2D();
$bc1d->savePath = $_SERVER['DOCUMENT_ROOT'] . '/tmp/';
$bc2d->savePath = $bc1d->savePath;
?>
<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title>Barcode Samples 1D/2D</title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="css/normalize.css">
        <link rel="stylesheet" href="css/main.css">
        <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>