| Server IP : 103.234.187.230 / Your IP : 216.73.216.216 Web Server : Apache System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/b2c.hellogtx.com/library/Barcode417/tests/ |
Upload File : |
<?php
namespace BigFish\PDF417\Tests;
use BigFish\PDF417\Codes;
use PHPUnit\Framework\TestCase;
class CodesTest extends TestCase
{
public function testGetCode()
{
$this->assertSame(0x1d5c0, Codes::getCode(0, 0));
$this->assertSame(0x1f560, Codes::getCode(1, 0));
$this->assertSame(0x1abe0, Codes::getCode(2, 0));
$this->assertSame(0x1bef4, Codes::getCode(0, 928));
$this->assertSame(0x13f26, Codes::getCode(1, 928));
$this->assertSame(0x1c7ea, Codes::getCode(2, 928));
}
/**
* @expectedException Exception
* @expectedExceptionMessage Invalid code word [0][929]
*
* @return [type] [description]
*/
public function testInvalidCode()
{
$this->assertSame(0x1abe0, Codes::getCode(0, 929));
}
/**
* @expectedException Exception
* @expectedExceptionMessage Invalid code word [3][0]
*/
public function testInvalidTable()
{
$this->assertSame(0x1abe0, Codes::getCode(3, 0));
}
}