mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-18 01:04:03 +00:00
31 lines
786 B
PHP
31 lines
786 B
PHP
<?php
|
|
/**
|
|
* @filesource UtilTest.php
|
|
* @created 08.02.2016
|
|
* @author Smiley <smiley@chillerlan.net>
|
|
* @copyright 2015 Smiley
|
|
* @license MIT
|
|
*/
|
|
|
|
use chillerlan\QRCode\Util;
|
|
|
|
class UtilTest extends PHPUnit_Framework_TestCase{
|
|
|
|
public function testIsNumber(){
|
|
$this->assertEquals(true, Util::isNumber('1234567890'));
|
|
$this->assertEquals(false, Util::isNumber('abc'));
|
|
}
|
|
|
|
public function testIsAlphaNum(){
|
|
$this->assertEquals(true, Util::isAlphaNum('ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 $%*+-./:'));
|
|
$this->assertEquals(false, Util::isAlphaNum('#'));
|
|
}
|
|
|
|
public function testIsKanji(){
|
|
$this->assertEquals(true, Util::isKanji('茗荷'));
|
|
$this->assertEquals(false, Util::isKanji('茗'));
|
|
$this->assertEquals(false, Util::isKanji('#'));
|
|
}
|
|
|
|
}
|