added UtilTest

This commit is contained in:
smiley
2016-02-08 14:43:25 +01:00
parent a70bc50436
commit 7a85c2e0a8
2 changed files with 28 additions and 0 deletions
+1
View File
@@ -18,6 +18,7 @@
<testsuites>
<testsuite name="php-qrcode test suite">
<file>tests/BitBufferTest.php</file>
<file>tests/UtilTest.php</file>
</testsuite>
</testsuites>
</phpunit>
+27
View File
@@ -0,0 +1,27 @@
<?php
/**
* @filesource UtilTest.php
* @created 08.02.2016
* @author Smiley <smiley@chillerlan.net>
* @copyright 2015 Smiley
* @license MIT
*/
use chillerlan\QRCode\Util;
use chillerlan\QRCode\QRConst;
class UtilTest extends PHPUnit_Framework_TestCase{
public function testIsNumber(){
$this->assertEquals(true, Util::isNumber('1234567890'));
}
public function testIsAlphaNum(){
$this->assertEquals(true, Util::isAlphaNum('ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 $%*+-./:'));
}
public function testIsKanji(){
$this->assertEquals(true, Util::isKanji('茗荷'));
}
}