Feature: Labelprint für Kistenetiketten hinzugefügt
This commit is contained in:
55
vendor/tecnickcom/tc-lib-barcode/test/Linear/CodabarTest.php
vendored
Normal file
55
vendor/tecnickcom/tc-lib-barcode/test/Linear/CodabarTest.php
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* CodabarTest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class CodabarTest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$barcode = $this->getTestObject();
|
||||
$type = $barcode->getBarcodeObj('CODABAR', '0123456789');
|
||||
$grid = $type->getGrid();
|
||||
$expected = "10110010010101010011010101100101010010110110010101010110"
|
||||
. "10010110101001010010101101001011010100110101011010010101011001001\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
}
|
||||
|
||||
public function testInvalidInput(): void
|
||||
{
|
||||
$this->bcExpectException('\\' . \Com\Tecnick\Barcode\Exception::class);
|
||||
$barcode = $this->getTestObject();
|
||||
$barcode->getBarcodeObj('CODABAR', chr(218));
|
||||
}
|
||||
}
|
||||
63
vendor/tecnickcom/tc-lib-barcode/test/Linear/CodeNineThreeTest.php
vendored
Normal file
63
vendor/tecnickcom/tc-lib-barcode/test/Linear/CodeNineThreeTest.php
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* CodeNineThreeTest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class CodeNineThreeTest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$barcode = $this->getTestObject();
|
||||
$bobj = $barcode->getBarcodeObj('C93', '0123456789');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "101011110100010100101001000101000100101000010100101000100"
|
||||
. "1001001001000101010100001000100101000010101001011001001100101010111101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('C93', '012345678901234567890123456789');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "10101111010001010010100100010100010010100001010010100010010010010010001010101"
|
||||
. "000010001001010000101010001010010100100010100010010100001010010100010010010010010001"
|
||||
. "010101000010001001010000101010001010010100100010100010010100001010010100010010010010"
|
||||
. "01000101010100001000100101000010101001001001001010001010111101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
}
|
||||
|
||||
public function testInvalidInput(): void
|
||||
{
|
||||
$this->bcExpectException('\\' . \Com\Tecnick\Barcode\Exception::class);
|
||||
$barcode = $this->getTestObject();
|
||||
$barcode->getBarcodeObj('C93', chr(255));
|
||||
}
|
||||
}
|
||||
66
vendor/tecnickcom/tc-lib-barcode/test/Linear/CodeOneOneTest.php
vendored
Normal file
66
vendor/tecnickcom/tc-lib-barcode/test/Linear/CodeOneOneTest.php
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* CodeOneOneTest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class CodeOneOneTest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$barcode = $this->getTestObject();
|
||||
$bobj = $barcode->getBarcodeObj('CODE11', '0123456789');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "10110010101011011010110100101101100101010110110110"
|
||||
. "11010100110101010011011010010110101010101101011001\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('CODE11', '123-456-789');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "10110010110101101001011011001010101101010110110110110"
|
||||
. "10100110101011010101001101101001011010101101101011010101011001\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('CODE11', '-');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "10110010101101010110101011001\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
}
|
||||
|
||||
public function testInvalidInput(): void
|
||||
{
|
||||
$this->bcExpectException('\\' . \Com\Tecnick\Barcode\Exception::class);
|
||||
$barcode = $this->getTestObject();
|
||||
$barcode->getBarcodeObj('CODE11', chr(255));
|
||||
}
|
||||
}
|
||||
67
vendor/tecnickcom/tc-lib-barcode/test/Linear/CodeOneTwoEight/CodeOneTwoEightATest.php
vendored
Normal file
67
vendor/tecnickcom/tc-lib-barcode/test/Linear/CodeOneTwoEight/CodeOneTwoEightATest.php
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* ATest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear\CodeOneTwoEight;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class CodeOneTwoEightATest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$barcode = $this->getTestObject();
|
||||
$bobj = $barcode->getBarcodeObj('C128A', 'ABCDEFG');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "110100001001010001100010001011000100010001101011000100010001101000100011000101101"
|
||||
. "0001000100110010001100011101011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('C128A', '0123456789');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "110100001001001110110010011100110110011100101100101110011001001110110111001001100"
|
||||
. "1110100111011011101110100110011100101100111101110101100011101011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('C128A', chr(241) . '01234567891');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "110100001001111010111010011101100100111001101100111001011001011100110010011101101"
|
||||
. "11001001100111010011101101110111010011001110010110010011100110100001101001100011101011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
}
|
||||
|
||||
public function testInvalidInput(): void
|
||||
{
|
||||
$this->bcExpectException('\\' . \Com\Tecnick\Barcode\Exception::class);
|
||||
$barcode = $this->getTestObject();
|
||||
$barcode->getBarcodeObj('C128A', chr(246) . '01234567891');
|
||||
}
|
||||
}
|
||||
61
vendor/tecnickcom/tc-lib-barcode/test/Linear/CodeOneTwoEight/CodeOneTwoEightBTest.php
vendored
Normal file
61
vendor/tecnickcom/tc-lib-barcode/test/Linear/CodeOneTwoEight/CodeOneTwoEightBTest.php
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* BTest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear\CodeOneTwoEight;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class CodeOneTwoEightBTest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$barcode = $this->getTestObject();
|
||||
$bobj = $barcode->getBarcodeObj('C128B', '0123456789');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "11010010000100111011001001110011011001110010110010111001100100111011011100"
|
||||
. "10011001110100111011011101110100110011100101100110000101001100011101011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('C128B', chr(241) . '01234567891');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "11010010000111101011101001110110010011100110110011100101100101110011001001"
|
||||
. "110110111001001100111010011101101110111010011001110010110010011100110100001100101100011101011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
}
|
||||
|
||||
public function testInvalidInput(): void
|
||||
{
|
||||
$this->bcExpectException('\\' . \Com\Tecnick\Barcode\Exception::class);
|
||||
$barcode = $this->getTestObject();
|
||||
$barcode->getBarcodeObj('C128B', chr(246) . '01234567891');
|
||||
}
|
||||
}
|
||||
80
vendor/tecnickcom/tc-lib-barcode/test/Linear/CodeOneTwoEight/CodeOneTwoEightCTest.php
vendored
Normal file
80
vendor/tecnickcom/tc-lib-barcode/test/Linear/CodeOneTwoEight/CodeOneTwoEightCTest.php
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* CTest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear\CodeOneTwoEight;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class CodeOneTwoEightCTest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$barcode = $this->getTestObject();
|
||||
$bobj = $barcode->getBarcodeObj('C128C', '0123456789');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "110100111001100110110011101101110101110110001000010110011011011110100001101001100011101011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('C128C', chr(241) . '0123456789');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "11010011100111101011101100110110011101101110101110110001000010110011011011110111101101101100"
|
||||
. "011101011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('C128C', chr(241) . '00123456780000000001');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "11010011100111101011101101100110010110011100100010110001110001011011000010100110110011001101"
|
||||
. "1001100110110011001101100110011001101100100010011001100011101011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('C128C', chr(241) . '42029651' . chr(241) . '9405510200864168997758');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "11010011100111101011101011011100011001100110101111000101101110100011110101110100010111101000"
|
||||
. "100110011011101000110011001101101100110011110100100110001000101000010011010111011110111101110101110"
|
||||
. "1100010111100101001100011101011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
}
|
||||
|
||||
public function testInvalidLength(): void
|
||||
{
|
||||
$this->bcExpectException('\\' . \Com\Tecnick\Barcode\Exception::class);
|
||||
$barcode = $this->getTestObject();
|
||||
$barcode->getBarcodeObj('C128C', '12345678901');
|
||||
}
|
||||
|
||||
public function testInvalidChar(): void
|
||||
{
|
||||
$this->bcExpectException('\\' . \Com\Tecnick\Barcode\Exception::class);
|
||||
$barcode = $this->getTestObject();
|
||||
$barcode->getBarcodeObj('C128C', '1A2345678901');
|
||||
}
|
||||
}
|
||||
173
vendor/tecnickcom/tc-lib-barcode/test/Linear/CodeOneTwoEightTest.php
vendored
Normal file
173
vendor/tecnickcom/tc-lib-barcode/test/Linear/CodeOneTwoEightTest.php
vendored
Normal file
@@ -0,0 +1,173 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* CodeOneTwoEightTest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class CodeOneTwoEightTest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$barcode = $this->getTestObject();
|
||||
$bobj = $barcode->getBarcodeObj('C128', '0123456789');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "110100111001100110110011101101110101110110001000010110011011011110100001101001100011101011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('C128', '1PBK500EI');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "110100100001001110011011101110110100010110001011000111011011100100100111011001001"
|
||||
. "11011001000110100011000100010111011001001100011101011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('C128', 'SCB500J1C3Y');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "110100100001101110100010001000110100010110001101110010010011101100100111011001011"
|
||||
. "011100010011100110100010001101100101110011101101000110110111101100011101011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('C128', '067023611120229212');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "110100111001001100100010110000100111011011101100100001011000100100110010011101100111010010101111"
|
||||
. "00010110011100110110111101100011101011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('C128', 'Data:28102003');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "110100100001011000100010010110000100111101001001011000011100100110101110111101110011010011001000"
|
||||
. "1001100100111010010011000100010001101100011101011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('C128', '12345678901');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "110100100001001110011010111011110111011011101011101100010000101100110110111101100110110011001100"
|
||||
. "1101100011101011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('C128', '1234');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "110100111001011001110010001011000100100111101100011101011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('C128', 'hello');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "110100100001001100001010110010000110010100001100101000010001111010100010011001100011101011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('C128', 'HI345678');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "110100100001100010100011000100010101110111101000101100011100010110110000101001000010011011000"
|
||||
. "11101011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('C128', 'HI34567A');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "1101001000011000101000110001000101100101110010111011110101110110001000010110010111101110101000"
|
||||
. "11000100100011001100011101011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('C128', 'Barcode 1');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "110100100001000101100010010110000100100111101000010110010001111010100001001101011001"
|
||||
. "00001101100110010011100110111011000101100011101011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('C128', "C1\tC2\tC3");
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "11010000100100010001101001110011010000110100100010001101100111001010000110100100010001101100101"
|
||||
. "1100100110011101100011101011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('C128', 'A1b2c3D4e5');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "1101001000010100011000100111001101001000011011001110010100001011001100101110010110001"
|
||||
. "000110010011101011001000011011100100100001101001100011101011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('C128', chr(241) . '0000801234999999999');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "1101001000011110101110100111011001011101111011011001100100011001001100110110011101101"
|
||||
. "1101101000111010111011110101110111101011101111010111011110110100010001100011101011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('C128', chr(241) . "000000\tABCDEF");
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "1101001110011110101110111101011101101100110011011001100110110011001110101111010000110100101000"
|
||||
. "110001000101100010001000110101100010001000110100010001100010100001100101100011101011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('C128', "\tABCD\tEFGH");
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "1101000010010000110100101000110001000101100010001000110101100010001000011010010001101000100011"
|
||||
. "000101101000100011000101000100011101101100011101011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('C128', "\tABCD\tabc\tABCdef");
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "1101000010010000110100101000110001000101100010001000110101100010001000011010010111101110100101"
|
||||
. "10000100100001101000010110011101011110100001101001010001100010001011000100010001101011110111010000100"
|
||||
. "1101011001000010110000100100001100101100011101011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('C128', "\tABCD\tabc\tdef");
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "1101000010010000110100101000110001000101100010001000110101100010001000011010010111101110100101"
|
||||
. "10000100100001101000010110011110100010100001101001000010011010110010000101100001001111010100011000111"
|
||||
. "01011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('C128', chr(241) . "\tABCD");
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "1101000010011110101110111101011101000011010010100011000100010110001000100011010110001000110111"
|
||||
. "011101100011101011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('C128', "\ta");
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "11010000100100001101001111010001010010110000110111000101100011101011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('C128', chr(241) . '00123456780000000001');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "1101001110011110101110111101011101101100110010110011100100010110001110001011011000010100110110"
|
||||
. "0110011011001100110110011001101100110011001101100100101111001100011101011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('C128', chr(241) . '42029651' . chr(241) . '9405510200864168997758');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "11010011100111101011101111010111010110111000110011001101011110001011011101000101111011101111010"
|
||||
. "1110101110111101000101111010001001100110111010001100110011011011001100111101001001100010001010"
|
||||
. "000100110101110111101111011101011101100010100100110001100011101011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
}
|
||||
}
|
||||
49
vendor/tecnickcom/tc-lib-barcode/test/Linear/CodeThreeNineCheckTest.php
vendored
Normal file
49
vendor/tecnickcom/tc-lib-barcode/test/Linear/CodeThreeNineCheckTest.php
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* CodeThreeNineCheckTest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class CodeThreeNineCheckTest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$barcode = $this->getTestObject();
|
||||
$type = $barcode->getBarcodeObj('C39+', '0123456789');
|
||||
$grid = $type->getGrid();
|
||||
$expected = "10001011101110101010001110111010111010001010111010111000101011101110111000101010101000"
|
||||
. "111010111011101000111010101011100011101010101000101110111011101000101110101011100010111010101"
|
||||
. "1100010101110100010111011101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
}
|
||||
}
|
||||
56
vendor/tecnickcom/tc-lib-barcode/test/Linear/CodeThreeNineExtCheckTest.php
vendored
Normal file
56
vendor/tecnickcom/tc-lib-barcode/test/Linear/CodeThreeNineExtCheckTest.php
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* CodeThreeNineExtCheckTest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class CodeThreeNineExtCheckTest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$barcode = $this->getTestObject();
|
||||
$type = $barcode->getBarcodeObj('C39E+', '0123456789');
|
||||
$grid = $type->getGrid();
|
||||
$expected = "10001011101110101010001110111010111010001010111010111000101011101110111000101010101000"
|
||||
. "111010111011101000111010101011100011101010101000101110111011101000101110101011100010111010101"
|
||||
. "1100010101110100010111011101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
}
|
||||
|
||||
public function testInvalidInput(): void
|
||||
{
|
||||
$this->bcExpectException('\\' . \Com\Tecnick\Barcode\Exception::class);
|
||||
$barcode = $this->getTestObject();
|
||||
$barcode->getBarcodeObj('C39E+', chr(218));
|
||||
}
|
||||
}
|
||||
49
vendor/tecnickcom/tc-lib-barcode/test/Linear/CodeThreeNineExtTest.php
vendored
Normal file
49
vendor/tecnickcom/tc-lib-barcode/test/Linear/CodeThreeNineExtTest.php
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* CodeThreeNineExtTest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class CodeThreeNineExtTest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$barcode = $this->getTestObject();
|
||||
$type = $barcode->getBarcodeObj('C39E', '0123456789');
|
||||
$grid = $type->getGrid();
|
||||
$expected = "10001011101110101010001110111010111010001010111010111000101011101110111000101010101000"
|
||||
. "111010111011101000111010101011100011101010101000101110111011101000101110101011100010111010100"
|
||||
. "010111011101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
}
|
||||
}
|
||||
56
vendor/tecnickcom/tc-lib-barcode/test/Linear/CodeThreeNineTest.php
vendored
Normal file
56
vendor/tecnickcom/tc-lib-barcode/test/Linear/CodeThreeNineTest.php
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* CodeThreeNineTest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class CodeThreeNineTest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$barcode = $this->getTestObject();
|
||||
$type = $barcode->getBarcodeObj('C39', '0123456789');
|
||||
$grid = $type->getGrid();
|
||||
$expected = "10001011101110101010001110111010111010001010111010111000101011101110"
|
||||
. "111000101010101000111010111011101000111010101011100011101010101000101110111"
|
||||
. "011101000101110101011100010111010100010111011101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
}
|
||||
|
||||
public function testInvalidInput(): void
|
||||
{
|
||||
$this->bcExpectException('\\' . \Com\Tecnick\Barcode\Exception::class);
|
||||
$barcode = $this->getTestObject();
|
||||
$barcode->getBarcodeObj('C39', chr(218));
|
||||
}
|
||||
}
|
||||
50
vendor/tecnickcom/tc-lib-barcode/test/Linear/EanEightTest.php
vendored
Normal file
50
vendor/tecnickcom/tc-lib-barcode/test/Linear/EanEightTest.php
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* EanEightTest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class EanEightTest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$barcode = $this->getTestObject();
|
||||
$type = $barcode->getBarcodeObj(
|
||||
'EAN8',
|
||||
'1234567'
|
||||
);
|
||||
$grid = $type->getGrid();
|
||||
$expected = "1010011001001001101111010100011010101001110101000010001001110010101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
}
|
||||
}
|
||||
50
vendor/tecnickcom/tc-lib-barcode/test/Linear/EanFiveTest.php
vendored
Normal file
50
vendor/tecnickcom/tc-lib-barcode/test/Linear/EanFiveTest.php
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* EanFiveTest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class EanFiveTest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$barcode = $this->getTestObject();
|
||||
$type = $barcode->getBarcodeObj(
|
||||
'EAN5',
|
||||
'12345'
|
||||
);
|
||||
$grid = $type->getGrid();
|
||||
$expected = "10110110011010010011010100001010100011010110001\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
}
|
||||
}
|
||||
63
vendor/tecnickcom/tc-lib-barcode/test/Linear/EanOneThreeTest.php
vendored
Normal file
63
vendor/tecnickcom/tc-lib-barcode/test/Linear/EanOneThreeTest.php
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* EanOneThreeTest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class EanOneThreeTest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$barcode = $this->getTestObject();
|
||||
$type = $barcode->getBarcodeObj('EAN13', '0123456789');
|
||||
$grid = $type->getGrid();
|
||||
$expected = "10100011010001101001100100100110111101010001101010100111010100001000100100100011101001001110101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$this->assertEquals('0001234567895', $type->getExtendedCode());
|
||||
}
|
||||
|
||||
public function testInvalidInput(): void
|
||||
{
|
||||
$this->bcExpectException('\\' . \Com\Tecnick\Barcode\Exception::class);
|
||||
$barcode = $this->getTestObject();
|
||||
$barcode->getBarcodeObj('EAN13', '}{');
|
||||
}
|
||||
|
||||
public function testInvalidLength(): void
|
||||
{
|
||||
$this->bcExpectException('\\' . \Com\Tecnick\Barcode\Exception::class);
|
||||
$barcode = $this->getTestObject();
|
||||
$barcode->getBarcodeObj('EAN13', '1111111111111');
|
||||
}
|
||||
}
|
||||
50
vendor/tecnickcom/tc-lib-barcode/test/Linear/EanTwoTest.php
vendored
Normal file
50
vendor/tecnickcom/tc-lib-barcode/test/Linear/EanTwoTest.php
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* EanTwoTest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class EanTwoTest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$barcode = $this->getTestObject();
|
||||
$type = $barcode->getBarcodeObj(
|
||||
'EAN2',
|
||||
'12'
|
||||
);
|
||||
$grid = $type->getGrid();
|
||||
$expected = "10110011001010010011\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
}
|
||||
}
|
||||
62
vendor/tecnickcom/tc-lib-barcode/test/Linear/ImbPreTest.php
vendored
Normal file
62
vendor/tecnickcom/tc-lib-barcode/test/Linear/ImbPreTest.php
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* ImbPreTest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class ImbPreTest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$barcode = $this->getTestObject();
|
||||
$type = $barcode->getBarcodeObj(
|
||||
'IMBPRE',
|
||||
'fatdfatdfatdfatdfatdfatdfatdfatdfatdfatdfatdfatdfatdfatdfatdfatdf'
|
||||
);
|
||||
$grid = $type->getGrid();
|
||||
$expected = "101000001010000010100000101000001010000010100000101000001010"
|
||||
. "000010100000101000001010000010100000101000001010000010100000101000001\n"
|
||||
. "1010101010101010101010101010101010101010101010101010101010101010101"
|
||||
. "01010101010101010101010101010101010101010101010101010101010101\n"
|
||||
. "1000001010000010100000101000001010000010100000101000001010000010100"
|
||||
. "00010100000101000001010000010100000101000001010000010100000101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
}
|
||||
|
||||
public function testInvalidInput(): void
|
||||
{
|
||||
$this->bcExpectException('\\' . \Com\Tecnick\Barcode\Exception::class);
|
||||
$barcode = $this->getTestObject();
|
||||
$barcode->getBarcodeObj('IMBPRE', 'fatd');
|
||||
}
|
||||
}
|
||||
119
vendor/tecnickcom/tc-lib-barcode/test/Linear/ImbTest.php
vendored
Normal file
119
vendor/tecnickcom/tc-lib-barcode/test/Linear/ImbTest.php
vendored
Normal file
@@ -0,0 +1,119 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* ImbTest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class ImbTest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$barcode = $this->getTestObject();
|
||||
$bobj = $barcode->getBarcodeObj('IMB', '00000-');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "100000101010001000101000101000000010000010100010001010100000"
|
||||
. "100010001000000010101000001010101000100000000000100010001000100000001\n"
|
||||
. "1010101010101010101010101010101010101010101010101010101010101010101"
|
||||
. "01010101010101010101010101010101010101010101010101010101010101\n"
|
||||
. "0000101000000010000010001000000000101010000010000000001000101010001"
|
||||
. "01010001010001010000010101000101000101000000000001000001000100\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('IMB', '0123456789');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "001010100010101000100010001010101010001000001000101010001010"
|
||||
. "101010100000000000000010101000000010001010100010001000101010001000001\n"
|
||||
. "1010101010101010101010101010101010101010101010101010101010101010101"
|
||||
. "01010101010101010101010101010101010101010101010101010101010101\n"
|
||||
. "1010101010101000001010000010101000000000000010100010001010000000000"
|
||||
. "00010100000100010001000001010101000001010000010101010100010101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('IMB', '01234567094987654321-01234567891');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "10100000101000100000100000101000101000100000000010101000000000000000101010001"
|
||||
. "0000000001010100000000000100010101010001000001010001\n"
|
||||
. "101010101010101010101010101010101010101010101010101010101010101010101010101010101010"
|
||||
. "101010101010101010101010101010101010101010101\n"
|
||||
. "000010001010101000100010000000100000001010001010000000101000100000100010001000101010"
|
||||
. "001010101010000000001010000000101000100000100\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('IMB', '01234567094987654321-012345678');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "10001000001010000000000010100000100000101010001000100010000010101010000010001"
|
||||
. "0001000000000000000100000001000100010000000101000101\n"
|
||||
. "101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010"
|
||||
. "101010101010101010101010101010101\n"
|
||||
. "001010000000101000000000100000000010000000000010001000000010000000101010001000000000100010000010"
|
||||
. "101000100000001000100010101000100\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('IMB', '01234567094987654321-01234');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "00000010101000000000100000001000100000000010001000101010001010000000100010101"
|
||||
. "0100000001000101010100000100000001010000000000010100\n"
|
||||
. "101010101010101010101010101010101010101010101010101010101010101010101010101010101010"
|
||||
. "101010101010101010101010101010101010101010101\n"
|
||||
. "100000001000101000001000100010001010001010001000100010001010000010101000000000101000"
|
||||
. "000010100000000010101000101000101010001010100\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('IMB', '01234567094987654321-');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "10000010100000000000100000101000000000000010000000101000001010001000100010101"
|
||||
. "0101000100010101010100000101000001010001000100000000\n"
|
||||
. "101010101010101010101010101010101010101010101010101010101010101010101010101010101010"
|
||||
. "101010101010101010101010101010101010101010101\n"
|
||||
. "000000100000001000000010000000000010001000000000100010101010001010101000101010101000"
|
||||
. "000010000000000010101000100000101000101000100\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('IMB', '01234567094987654321-01234567891');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "10100000101000100000100000101000101000100000000010101000000000000000101010001"
|
||||
. "0000000001010100000000000100010101010001000001010001\n"
|
||||
. "101010101010101010101010101010101010101010101010101010101010101010101010101010101010"
|
||||
. "101010101010101010101010101010101010101010101\n"
|
||||
. "000010001010101000100010000000100000001010001010000000101000100000100010001000101010"
|
||||
. "001010101010000000001010000000101000100000100\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
}
|
||||
|
||||
public function testInvalidRoutingCode(): void
|
||||
{
|
||||
$this->bcExpectException('\\' . \Com\Tecnick\Barcode\Exception::class);
|
||||
$barcode = $this->getTestObject();
|
||||
$barcode->getBarcodeObj('IMB', '01234567094987654321-1');
|
||||
}
|
||||
}
|
||||
57
vendor/tecnickcom/tc-lib-barcode/test/Linear/InterleavedTwoOfFiveCheckTest.php
vendored
Normal file
57
vendor/tecnickcom/tc-lib-barcode/test/Linear/InterleavedTwoOfFiveCheckTest.php
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* InterleavedTwoOfFiveCheckTest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class InterleavedTwoOfFiveCheckTest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$barcode = $this->getTestObject();
|
||||
$type = $barcode->getBarcodeObj(
|
||||
'I25+',
|
||||
'0123456789'
|
||||
);
|
||||
$grid = $type->getGrid();
|
||||
$expected = "10101010110011001011010010101100110110100101001101001100101010010101100110100110100110101101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
}
|
||||
|
||||
public function testInvalidInput(): void
|
||||
{
|
||||
$this->bcExpectException('\\' . \Com\Tecnick\Barcode\Exception::class);
|
||||
$barcode = $this->getTestObject();
|
||||
$barcode->getBarcodeObj('I25+', 'GHI');
|
||||
}
|
||||
}
|
||||
50
vendor/tecnickcom/tc-lib-barcode/test/Linear/InterleavedTwoOfFiveTest.php
vendored
Normal file
50
vendor/tecnickcom/tc-lib-barcode/test/Linear/InterleavedTwoOfFiveTest.php
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* InterleavedTwoOfFiveTest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class InterleavedTwoOfFiveTest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$barcode = $this->getTestObject();
|
||||
$type = $barcode->getBarcodeObj(
|
||||
'I25',
|
||||
'0123456789'
|
||||
);
|
||||
$grid = $type->getGrid();
|
||||
$expected = "101010010110110100100110010101101001011001011010110110100100110100101100101101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
}
|
||||
}
|
||||
49
vendor/tecnickcom/tc-lib-barcode/test/Linear/KlantIndexTest.php
vendored
Normal file
49
vendor/tecnickcom/tc-lib-barcode/test/Linear/KlantIndexTest.php
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* KlantIndexTest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class KlantIndexTest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$barcode = $this->getTestObject();
|
||||
$type = $barcode->getBarcodeObj('KIX', '0123456789');
|
||||
$grid = $type->getGrid();
|
||||
$expected = "00001010000010100000101000001010000010100000101000100010001000100010001000100010\n"
|
||||
. "10101010101010101010101010101010101010101010101010101010101010101010101010101010\n"
|
||||
. "00001010001000100010100010000010100010001010000000001010001000100010100010000010\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
}
|
||||
}
|
||||
56
vendor/tecnickcom/tc-lib-barcode/test/Linear/MsiCheckTest.php
vendored
Normal file
56
vendor/tecnickcom/tc-lib-barcode/test/Linear/MsiCheckTest.php
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* MsiCheckTest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class MsiCheckTest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$barcode = $this->getTestObject();
|
||||
$type = $barcode->getBarcodeObj('MSI+', '0123456789ABCDEF');
|
||||
$grid = $type->getGrid();
|
||||
$expected = "110100100100100100100100110100100110100100100110110100110100100100110100110100110110100"
|
||||
. "1001101101101101001001001101001001101101001101001101001101101101101001001101101001101101101101"
|
||||
. "001101101101101001001001101001\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
}
|
||||
|
||||
public function testInvalidInput(): void
|
||||
{
|
||||
$this->bcExpectException('\\' . \Com\Tecnick\Barcode\Exception::class);
|
||||
$barcode = $this->getTestObject();
|
||||
$barcode->getBarcodeObj('MSI+', 'GHI');
|
||||
}
|
||||
}
|
||||
48
vendor/tecnickcom/tc-lib-barcode/test/Linear/MsiTest.php
vendored
Normal file
48
vendor/tecnickcom/tc-lib-barcode/test/Linear/MsiTest.php
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* MsiTest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class MsiTest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$barcode = $this->getTestObject();
|
||||
$type = $barcode->getBarcodeObj('MSI', '0123456789');
|
||||
$grid = $type->getGrid();
|
||||
$expected = "110100100100100100100100110100100110100100100110110100110100"
|
||||
. "1001001101001101001101101001001101101101101001001001101001001101001\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
}
|
||||
}
|
||||
48
vendor/tecnickcom/tc-lib-barcode/test/Linear/PharmaTest.php
vendored
Normal file
48
vendor/tecnickcom/tc-lib-barcode/test/Linear/PharmaTest.php
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* PharmaTest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class PharmaTest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$barcode = $this->getTestObject();
|
||||
$type = $barcode->getBarcodeObj('PHARMA', '0123456789');
|
||||
$grid = $type->getGrid();
|
||||
$expected = "111001110010011100100111001110010011100111001110011100100"
|
||||
. "1001110011100100111001001001001110010011100111001\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
}
|
||||
}
|
||||
47
vendor/tecnickcom/tc-lib-barcode/test/Linear/PharmaTwoTracksTest.php
vendored
Normal file
47
vendor/tecnickcom/tc-lib-barcode/test/Linear/PharmaTwoTracksTest.php
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* PharmaTwoTracksTest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class PharmaTwoTracksTest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$barcode = $this->getTestObject();
|
||||
$type = $barcode->getBarcodeObj('PHARMA2T', '0123456789');
|
||||
$grid = $type->getGrid();
|
||||
$expected = "101000001010100010001010001000101\n000010101010001010101000100010001\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
}
|
||||
}
|
||||
50
vendor/tecnickcom/tc-lib-barcode/test/Linear/PlanetTest.php
vendored
Normal file
50
vendor/tecnickcom/tc-lib-barcode/test/Linear/PlanetTest.php
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* PlanetTest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class PlanetTest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$barcode = $this->getTestObject();
|
||||
$type = $barcode->getBarcodeObj('PLANET', '0123456789');
|
||||
$grid = $type->getGrid();
|
||||
$expected = "100000101010101010000010100010001010000010100010100010"
|
||||
. "00100010100000101000101010000010100010001000101010001000101\n"
|
||||
. "1010101010101010101010101010101010101010101010101010101010101"
|
||||
. "0101010101010101010101010101010101010101010101010101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
}
|
||||
}
|
||||
57
vendor/tecnickcom/tc-lib-barcode/test/Linear/PostnetTest.php
vendored
Normal file
57
vendor/tecnickcom/tc-lib-barcode/test/Linear/PostnetTest.php
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* PostnetTest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class PostnetTest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$barcode = $this->getTestObject();
|
||||
$type = $barcode->getBarcodeObj('POSTNET', '0123456789');
|
||||
$grid = $type->getGrid();
|
||||
$expected = "101010000000000000101000001000100000101000001000001000"
|
||||
. "10001000001010000010000000101000001000100010000000100010001\n"
|
||||
. "1010101010101010101010101010101010101010101010101010101010101"
|
||||
. "0101010101010101010101010101010101010101010101010101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
}
|
||||
|
||||
public function testInvalidInput(): void
|
||||
{
|
||||
$this->bcExpectException('\\' . \Com\Tecnick\Barcode\Exception::class);
|
||||
$barcode = $this->getTestObject();
|
||||
$barcode->getBarcodeObj('POSTNET', '}{');
|
||||
}
|
||||
}
|
||||
52
vendor/tecnickcom/tc-lib-barcode/test/Linear/RawTest.php
vendored
Normal file
52
vendor/tecnickcom/tc-lib-barcode/test/Linear/RawTest.php
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* RawTest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class RawTest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$testObj = $this->getTestObject();
|
||||
$testObj = $this->getTestObject();
|
||||
|
||||
$type = $testObj->getBarcodeObj(
|
||||
'LRAW',
|
||||
'01001100011100001111,10110011100011110000'
|
||||
);
|
||||
$grid = $type->getGrid();
|
||||
$expected = "01001100011100001111\n10110011100011110000\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
}
|
||||
}
|
||||
56
vendor/tecnickcom/tc-lib-barcode/test/Linear/RoyalMailFourCcTest.php
vendored
Normal file
56
vendor/tecnickcom/tc-lib-barcode/test/Linear/RoyalMailFourCcTest.php
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* RoyalMailFourCcTest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class RoyalMailFourCcTest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$barcode = $this->getTestObject();
|
||||
$type = $barcode->getBarcodeObj('RMS4CC', '0123456789');
|
||||
$grid = $type->getGrid();
|
||||
$expected = "1000001010000010100000101000001010000010100000101000100010001000100010001000100010001000101\n"
|
||||
. "1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101\n"
|
||||
. "0000001010001000100010100010000010100010001010000000001010001000100010100010000010000010101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
}
|
||||
|
||||
public function testInvalidInput(): void
|
||||
{
|
||||
$this->bcExpectException('\\' . \Com\Tecnick\Barcode\Exception::class);
|
||||
$barcode = $this->getTestObject();
|
||||
$barcode->getBarcodeObj('RMS4CC', '}{');
|
||||
}
|
||||
}
|
||||
55
vendor/tecnickcom/tc-lib-barcode/test/Linear/StandardTwoOfFiveCheckTest.php
vendored
Normal file
55
vendor/tecnickcom/tc-lib-barcode/test/Linear/StandardTwoOfFiveCheckTest.php
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* StandardTwoOfFiveCheckTest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class StandardTwoOfFiveCheckTest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$barcode = $this->getTestObject();
|
||||
$type = $barcode->getBarcodeObj('S25+', '0123456789');
|
||||
$grid = $type->getGrid();
|
||||
$expected = '111011101010101110111010101011101110101110101010111010111010101110111011101010101010111010'
|
||||
. '1110111010111010101011101110101010101011101110111010101110101011101011101011101011101010111010111' . "\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
}
|
||||
|
||||
public function testInvalidInput(): void
|
||||
{
|
||||
$this->bcExpectException('\\' . \Com\Tecnick\Barcode\Exception::class);
|
||||
$barcode = $this->getTestObject();
|
||||
$barcode->getBarcodeObj('S25+', '}{');
|
||||
}
|
||||
}
|
||||
48
vendor/tecnickcom/tc-lib-barcode/test/Linear/StandardTwoOfFiveTest.php
vendored
Normal file
48
vendor/tecnickcom/tc-lib-barcode/test/Linear/StandardTwoOfFiveTest.php
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* StandardTwoOfFiveTest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class StandardTwoOfFiveTest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$barcode = $this->getTestObject();
|
||||
$type = $barcode->getBarcodeObj('S25', '0123456789');
|
||||
$grid = $type->getGrid();
|
||||
$expected = '111011101010101110111010111010101011101011101010111011101110101010101011101011101110101110101010'
|
||||
. '111011101010101010111011101110101011101010111010111010111010111' . "\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
}
|
||||
}
|
||||
52
vendor/tecnickcom/tc-lib-barcode/test/Linear/UpcATest.php
vendored
Normal file
52
vendor/tecnickcom/tc-lib-barcode/test/Linear/UpcATest.php
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* UpcATest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class UpcATest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$barcode = $this->getTestObject();
|
||||
$bobj = $barcode->getBarcodeObj('UPCA', '0123456789');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "10100011010001101001100100100110111101010001101010100111010100001000100100100011101001001110101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('UPCA', '012345678912');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "10100011010011001001001101111010100011011000101010101000010001001001000111010011001101101100101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
}
|
||||
}
|
||||
117
vendor/tecnickcom/tc-lib-barcode/test/Linear/UpcETest.php
vendored
Normal file
117
vendor/tecnickcom/tc-lib-barcode/test/Linear/UpcETest.php
vendored
Normal file
@@ -0,0 +1,117 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* UpcETest.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*
|
||||
* This file is part of tc-lib-barcode software library.
|
||||
*/
|
||||
|
||||
namespace Test\Linear;
|
||||
|
||||
use Test\TestUtil;
|
||||
|
||||
/**
|
||||
* Barcode class test
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Barcode
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2024 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-barcode
|
||||
*/
|
||||
class UpcETest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Barcode\Barcode
|
||||
{
|
||||
return new \Com\Tecnick\Barcode\Barcode();
|
||||
}
|
||||
|
||||
public function testGetGrid(): void
|
||||
{
|
||||
$barcode = $this->getTestObject();
|
||||
$bobj = $barcode->getBarcodeObj('UPCE', '725270');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "101001000100100110110001001101101110110100111010101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('UPCE', '725271');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "101001000100100110111001001001101110110110011010101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('UPCE', '725272');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "101001000100100110111001001001100100010010011010101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('UPCE', '725273');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "101001000100100110110001001101101110110100001010101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('UPCE', '725274');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "101001000100100110110001001101100100010100011010101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('UPCE', '725275');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "101001000100100110111001001101101110110110001010101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('UPCE', '725276');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "101001000100110110110001001101101110110101111010101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('UPCE', '725277');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "101001000100100110111001001001101110110010001010101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('UPCE', '725278');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "101001000100100110110001001101100100010110111010101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('UPCE', '725279');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "101001000100110110110001001001100100010001011010101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('UPCE', '0123456789');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "101010011100110010010011010000100111010001011010101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('UPCE', '012345678912');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "101011001100110110111101010001101110010011001010101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('UPCE', '4210000526');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "101001110100100110111001001101101011110011001010101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('UPCE', '4240000526');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "101001110100110110100011001101101011110111101010101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
|
||||
$bobj = $barcode->getBarcodeObj('UPCE', '4241000526');
|
||||
$grid = $bobj->getGrid();
|
||||
$expected = "101001110100100110011101001100101011110011101010101\n";
|
||||
$this->assertEquals($expected, $grid);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user