This commit is contained in:
codemasher
2018-09-19 20:35:16 +02:00
parent 0cfd4fb3a6
commit 2aee933b1e
30 changed files with 134 additions and 169 deletions
+4 -4
View File
@@ -12,9 +12,9 @@
namespace chillerlan\QRCodeTest\Data;
use chillerlan\QRCode\Data\QRMatrix;
use chillerlan\QRCode\QRCode;
use chillerlan\QRCode\{QRCode, Data\QRMatrix};
use chillerlan\QRCodeTest\QRTestAbstract;
use ReflectionClass;
class QRMatrixTest extends QRTestAbstract{
@@ -104,7 +104,7 @@ class QRMatrixTest extends QRTestAbstract{
public function testVersionPattern() {
foreach (self::VERSION_REF as $version => $mask) {
$hexRef = base_convert(self::VERSION_REF[$version],2 ,16);
$hexImpl = dechex(QRMatrix::versionPattern[$version]);
$hexImpl = dechex((new ReflectionClass(QRMatrix::class))->getConstant('versionPattern')[$version]);
$this->assertEquals($hexRef, $hexImpl);
}
@@ -157,7 +157,7 @@ class QRMatrixTest extends QRTestAbstract{
->setAlignmentPattern()
;
$alignmentPattern = QRMatrix::alignmentPattern[$this->version];
$alignmentPattern = (new ReflectionClass(QRMatrix::class))->getConstant('alignmentPattern')[$this->version];
foreach($alignmentPattern as $py){
foreach($alignmentPattern as $px){