mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-30 03:58:28 +00:00
added UtilTest
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
<testsuites>
|
||||
<testsuite name="php-qrcode test suite">
|
||||
<file>tests/BitBufferTest.php</file>
|
||||
<file>tests/UtilTest.php</file>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
</phpunit>
|
||||
|
||||
@@ -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('茗荷'));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user