coverage, yes?

This commit is contained in:
smiley
2016-02-09 16:11:19 +01:00
parent 0f5b7670c2
commit fa9b108a2f
+14
View File
@@ -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);