diff --git a/phpunit.xml b/phpunit.xml index c3cd6a38c..d395b9b9b 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -18,6 +18,7 @@ tests/BitBufferTest.php + tests/UtilTest.php diff --git a/tests/UtilTest.php b/tests/UtilTest.php new file mode 100644 index 000000000..817400ba3 --- /dev/null +++ b/tests/UtilTest.php @@ -0,0 +1,27 @@ + + * @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('茗荷')); + } + +}