mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-30 20:17:17 +00:00
coverage, yes?
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
namespace chillerlan\QRCodeTest;
|
||||
|
||||
use chillerlan\QRCode\QRCode;
|
||||
use chillerlan\QRCode\QRConst;
|
||||
use chillerlan\QRCode\QROptions;
|
||||
use chillerlan\QRCode\Output\QRImage;
|
||||
use chillerlan\QRCode\Output\QRImageOptions;
|
||||
@@ -57,6 +58,19 @@ class QRCodeTest extends \PHPUnit_Framework_TestCase{
|
||||
(new QRCode($data, new QRString))->getRawData();
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider stringDataProvider
|
||||
*/
|
||||
public function testTypeAndErrorcorrectlevelCoverage($data){
|
||||
foreach(QRConst::MAX_BITS as $type => $x){
|
||||
foreach(QRConst::RSBLOCK as $eclevel => $y){
|
||||
$this->options->typeNumber = $type;
|
||||
$this->options->errorCorrectLevel = $eclevel;
|
||||
$this->assertInstanceOf(QRCode::class, new QRCode($data, new QRString, $this->options));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function testTypeAutoOverride(){
|
||||
$this->options->typeNumber = QRCode::TYPE_05;
|
||||
new QRCode('foobar', new QRString, $this->options);
|
||||
|
||||
Reference in New Issue
Block a user