Skip to content

Commit

Permalink
testQRCodeData() testQRCodeFile()
Browse files Browse the repository at this point in the history
  • Loading branch information
yakeing authored Sep 2, 2019
1 parent 860c86c commit 9095200
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tests/QRCodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
use qr_code\QrCode;
use PHPUnit\Framework\TestCase;
class QRCodeTest extends TestCase{
public function testQRCode(){
//Testing raw data of two-dimensional code
$imag = QrCode::image('QRCode', 32, false, 'H', 'jpg', 2, array('235,00,100','68,200,90'), 10, true);
$this->assertTrue(is_array($imag));
//Generating 2-D Code Picture File

//Generating 2-D Code Picture File
public function testQRCodeFile(){
$text = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$pixel = 350;
$icon = dirname(__FILE__).'/icon.jpg';
Expand All @@ -21,4 +19,10 @@ public function testQRCode(){
QrCode::image($text, $pixel, $icon, $distinguish, $type, $margin, $color, $spec, false, $OutputPath);
$this->assertFileExists($OutputPath);
}

//Testing raw data of two-dimensional code
public function testQRCodeData(){
$imag = QrCode::image('QRCode', 32, false, 'H', 'jpg', 2, array('235,00,100','68,200,90'), 10, true);
$this->assertTrue(is_array($imag));
}
}

0 comments on commit 9095200

Please sign in to comment.