From 6e3e5c1c329b76f05da351a658605bda934b38d5 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Sat, 30 Sep 2017 11:08:02 -0600 Subject: [PATCH] Removed extraneous files --- vendor/bacon/bacon-qr-code/.gitignore | 7 - vendor/bacon/bacon-qr-code/.travis.yml | 9 - vendor/bacon/bacon-qr-code/composer.json | 25 - .../tests/BaconQrCode/Common/BitArrayTest.php | 197 ---- .../BaconQrCode/Common/BitMatrixTest.php | 119 -- .../tests/BaconQrCode/Common/BitUtilsTest.php | 30 - .../Common/ErrorCorrectionLevelTest.php | 40 - .../Common/FormatInformationTest.php | 104 -- .../tests/BaconQrCode/Common/ModeTest.php | 42 - .../Common/ReedSolomonCodecTest.php | 107 -- .../tests/BaconQrCode/Common/VersionTest.php | 88 -- .../tests/BaconQrCode/Encoder/EncoderTest.php | 468 -------- .../BaconQrCode/Encoder/MaskUtilTest.php | 281 ----- .../BaconQrCode/Encoder/MatrixUtilTest.php | 336 ------ .../BaconQrCode/Renderer/Text/HtmlTest.php | 99 -- .../BaconQrCode/Renderer/Text/TextTest.php | 149 --- .../bacon/bacon-qr-code/tests/bootstrap.php | 10 - vendor/bacon/bacon-qr-code/tests/phpunit.xml | 11 - vendor/robthree/twofactorauth/.gitignore | 186 --- vendor/robthree/twofactorauth/.travis.yml | 11 - .../.vs/config/applicationhost.config | 1031 ----------------- .../twofactorauth/TwoFactorAuth.phpproj | 69 -- vendor/robthree/twofactorauth/composer.json | 36 - vendor/robthree/twofactorauth/composer.lock | 980 ---------------- vendor/robthree/twofactorauth/demo/demo.php | 35 - vendor/robthree/twofactorauth/demo/loader.php | 50 - vendor/robthree/twofactorauth/logo.png | Bin 2636 -> 0 bytes .../multifactorauthforeveryone.png | Bin 20735 -> 0 bytes .../twofactorauth/tests/TwoFactorAuthTest.php | 381 ------ vendor/zendframework/zendxml/.gitignore | 5 - vendor/zendframework/zendxml/.travis.yml | 43 - vendor/zendframework/zendxml/composer.json | 40 - .../zendframework/zendxml/tests/Bootstrap.php | 92 -- .../tests/ZendXmlTest/MultibyteTest.php | 125 -- .../tests/ZendXmlTest/SecurityTest.php | 135 --- .../zendxml/tests/phpunit.xml.dist | 27 - 36 files changed, 5368 deletions(-) delete mode 100644 vendor/bacon/bacon-qr-code/.gitignore delete mode 100644 vendor/bacon/bacon-qr-code/.travis.yml delete mode 100644 vendor/bacon/bacon-qr-code/composer.json delete mode 100644 vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/BitArrayTest.php delete mode 100644 vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/BitMatrixTest.php delete mode 100644 vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/BitUtilsTest.php delete mode 100644 vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/ErrorCorrectionLevelTest.php delete mode 100644 vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/FormatInformationTest.php delete mode 100644 vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/ModeTest.php delete mode 100644 vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/ReedSolomonCodecTest.php delete mode 100644 vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/VersionTest.php delete mode 100644 vendor/bacon/bacon-qr-code/tests/BaconQrCode/Encoder/EncoderTest.php delete mode 100644 vendor/bacon/bacon-qr-code/tests/BaconQrCode/Encoder/MaskUtilTest.php delete mode 100644 vendor/bacon/bacon-qr-code/tests/BaconQrCode/Encoder/MatrixUtilTest.php delete mode 100644 vendor/bacon/bacon-qr-code/tests/BaconQrCode/Renderer/Text/HtmlTest.php delete mode 100644 vendor/bacon/bacon-qr-code/tests/BaconQrCode/Renderer/Text/TextTest.php delete mode 100644 vendor/bacon/bacon-qr-code/tests/bootstrap.php delete mode 100644 vendor/bacon/bacon-qr-code/tests/phpunit.xml delete mode 100644 vendor/robthree/twofactorauth/.gitignore delete mode 100644 vendor/robthree/twofactorauth/.travis.yml delete mode 100644 vendor/robthree/twofactorauth/.vs/config/applicationhost.config delete mode 100644 vendor/robthree/twofactorauth/TwoFactorAuth.phpproj delete mode 100644 vendor/robthree/twofactorauth/composer.json delete mode 100644 vendor/robthree/twofactorauth/composer.lock delete mode 100644 vendor/robthree/twofactorauth/demo/demo.php delete mode 100644 vendor/robthree/twofactorauth/demo/loader.php delete mode 100644 vendor/robthree/twofactorauth/logo.png delete mode 100644 vendor/robthree/twofactorauth/multifactorauthforeveryone.png delete mode 100644 vendor/robthree/twofactorauth/tests/TwoFactorAuthTest.php delete mode 100644 vendor/zendframework/zendxml/.gitignore delete mode 100644 vendor/zendframework/zendxml/.travis.yml delete mode 100644 vendor/zendframework/zendxml/composer.json delete mode 100644 vendor/zendframework/zendxml/tests/Bootstrap.php delete mode 100644 vendor/zendframework/zendxml/tests/ZendXmlTest/MultibyteTest.php delete mode 100644 vendor/zendframework/zendxml/tests/ZendXmlTest/SecurityTest.php delete mode 100755 vendor/zendframework/zendxml/tests/phpunit.xml.dist diff --git a/vendor/bacon/bacon-qr-code/.gitignore b/vendor/bacon/bacon-qr-code/.gitignore deleted file mode 100644 index 35c1bcdf..00000000 --- a/vendor/bacon/bacon-qr-code/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -nbproject -.idea -.buildpath -.project -.DS_Store -.*.sw* -.*.un~ diff --git a/vendor/bacon/bacon-qr-code/.travis.yml b/vendor/bacon/bacon-qr-code/.travis.yml deleted file mode 100644 index 4e554be6..00000000 --- a/vendor/bacon/bacon-qr-code/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: php -php: - - 5.3 - - 5.4 - - 5.5 - - 7.0 - - hhvm - -script: phpunit --bootstrap tests/bootstrap.php --configuration tests/phpunit.xml tests \ No newline at end of file diff --git a/vendor/bacon/bacon-qr-code/composer.json b/vendor/bacon/bacon-qr-code/composer.json deleted file mode 100644 index 01b16bc2..00000000 --- a/vendor/bacon/bacon-qr-code/composer.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "bacon/bacon-qr-code", - "description": "BaconQrCode is a QR code generator for PHP.", - "license" : "BSD-2-Clause", - "homepage": "https://github.com/Bacon/BaconQrCode", - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-gd": "to generate QR code images" - }, - "authors": [ - { - "name": "Ben Scholzen 'DASPRiD'", - "email": "mail@dasprids.de", - "homepage": "http://www.dasprids.de", - "role": "Developer" - } - ], - "autoload": { - "psr-0": { - "BaconQrCode": "src/" - } - } -} diff --git a/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/BitArrayTest.php b/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/BitArrayTest.php deleted file mode 100644 index 06aa4e16..00000000 --- a/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/BitArrayTest.php +++ /dev/null @@ -1,197 +0,0 @@ -assertFalse($array->get($i)); - $array->set($i); - $this->assertTrue($array->get($i)); - } - } - - public function testGetNextSet1() - { - $array = new BitArray(32); - - for ($i = 0; $i < $array->getSize(); $i++) { - $this->assertEquals($i, 32, '', $array->getNextSet($i)); - } - - $array = new BitArray(33); - - for ($i = 0; $i < $array->getSize(); $i++) { - $this->assertEquals($i, 33, '', $array->getNextSet($i)); - } - } - - public function testGetNextSet2() - { - $array = new BitArray(33); - - for ($i = 0; $i < $array->getSize(); $i++) { - $this->assertEquals($i, $i <= 31 ? 31 : 33, '', $array->getNextSet($i)); - } - - $array = new BitArray(33); - - for ($i = 0; $i < $array->getSize(); $i++) { - $this->assertEquals($i, 32, '', $array->getNextSet($i)); - } - } - - public function testGetNextSet3() - { - $array = new BitArray(63); - $array->set(31); - $array->set(32); - - for ($i = 0; $i < $array->getSize(); $i++) { - if ($i <= 31) { - $expected = 31; - } elseif ($i <= 32) { - $expected = 32; - } else { - $expected = 63; - } - - $this->assertEquals($i, $expected, '', $array->getNextSet($i)); - } - } - - public function testGetNextSet4() - { - $array = new BitArray(63); - $array->set(33); - $array->set(40); - - for ($i = 0; $i < $array->getSize(); $i++) { - if ($i <= 33) { - $expected = 33; - } elseif ($i <= 40) { - $expected = 40; - } else { - $expected = 63; - } - - $this->assertEquals($i, $expected, '', $array->getNextSet($i)); - } - } - - public function testGetNextSet5() - { - mt_srand(hexdec('deadbeef')); - - for ($i = 0; $i < 10; $i++) { - $array = new BitArray(mt_rand(1, 100)); - $numSet = mt_rand(0, 19); - - for ($j = 0; $j < $numSet; $j++) { - $array->set(mt_rand(0, $array->getSize() - 1)); - } - - $numQueries = mt_rand(0, 19); - - for ($j = 0; $j < $numQueries; $j++) { - $query = mt_rand(0, $array->getSize() - 1); - $expected = $query; - - while ($expected < $array->getSize() && !$array->get($expected)) { - $expected++; - } - - $actual = $array->getNextSet($query); - - if ($actual !== $expected) { - $array->getNextSet($query); - } - - $this->assertEquals($expected, $actual); - } - } - } - - public function testSetBulk() - { - $array = new BitArray(64); - $array->setBulk(32, 0xFFFF0000); - - for ($i = 0; $i < 48; $i++) { - $this->assertFalse($array->get($i)); - } - - for ($i = 48; $i < 64; $i++) { - $this->assertTrue($array->get($i)); - } - } - - public function testClear() - { - $array = new BitArray(32); - - for ($i = 0; $i < 32; $i++) { - $array->set($i); - } - - $array->clear(); - - for ($i = 0; $i < 32; $i++) { - $this->assertFalse($array->get($i)); - } - } - - public function testGetArray() - { - $array = new BitArray(64); - $array->set(0); - $array->set(63); - - $ints = $array->getBitArray(); - - $this->assertEquals(1, $ints[0]); - $this->assertEquals(0x80000000, $ints[1]); - } - - public function testIsRange() - { - $array = new BitArray(64); - $this->assertTrue($array->isRange(0, 64, false)); - $this->assertFalse($array->isRange(0, 64, true)); - - $array->set(32); - $this->assertTrue($array->isRange(32, 33, true)); - - $array->set(31); - $this->assertTrue($array->isRange(31, 33, true)); - - $array->set(34); - $this->assertFalse($array->isRange(31, 35, true)); - - for ($i = 0; $i < 31; $i++) { - $array->set($i); - } - - $this->assertTrue($array->isRange(0, 33, true)); - - for ($i = 33; $i < 64; $i++) { - $array->set($i); - } - - $this->assertTrue($array->isRange(0, 64, true)); - $this->assertFalse($array->isRange(0, 64, false)); - } -} \ No newline at end of file diff --git a/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/BitMatrixTest.php b/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/BitMatrixTest.php deleted file mode 100644 index 89a58812..00000000 --- a/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/BitMatrixTest.php +++ /dev/null @@ -1,119 +0,0 @@ -assertEquals(33, $matrix->getHeight()); - - for ($y = 0; $y < 33; $y++) { - for ($x = 0; $x < 33; $x++) { - if ($y * $x % 3 === 0) { - $matrix->set($x, $y); - } - } - } - - for ($y = 0; $y < 33; $y++) { - for ($x = 0; $x < 33; $x++) { - $this->assertEquals($x * $y % 3 === 0, $matrix->get($x, $y)); - } - } - } - - public function testSetRegion() - { - $matrix = new BitMatrix(5); - $matrix->setRegion(1, 1, 3, 3); - - for ($y = 0; $y < 5; $y++) { - for ($x = 0; $x < 5; $x++) { - $this->assertEquals($y >= 1 && $y <= 3 && $x >= 1 && $x <= 3, $matrix->get($x, $y)); - } - } - } - - public function testRectangularMatrix() - { - $matrix = new BitMatrix(75, 20); - $this->assertEquals(75, $matrix->getWidth()); - $this->assertEquals(20, $matrix->getHeight()); - - $matrix->set(10, 0); - $matrix->set(11, 1); - $matrix->set(50, 2); - $matrix->set(51, 3); - $matrix->flip(74, 4); - $matrix->flip(0, 5); - - $this->assertTrue($matrix->get(10, 0)); - $this->assertTrue($matrix->get(11, 1)); - $this->assertTrue($matrix->get(50, 2)); - $this->assertTrue($matrix->get(51, 3)); - $this->assertTrue($matrix->get(74, 4)); - $this->assertTrue($matrix->get(0, 5)); - - $matrix->flip(50, 2); - $matrix->flip(51, 3); - - $this->assertFalse($matrix->get(50, 2)); - $this->assertFalse($matrix->get(51, 3)); - } - - public function testRectangularSetRegion() - { - $matrix = new BitMatrix(320, 240); - $this->assertEquals(320, $matrix->getWidth()); - $this->assertEquals(240, $matrix->getHeight()); - - $matrix->setRegion(105, 22, 80, 12); - - for ($y = 0; $y < 240; $y++) { - for ($x = 0; $x < 320; $x++) { - $this->assertEquals($y >= 22 && $y < 34 && $x >= 105 && $x < 185, $matrix->get($x, $y)); - } - } - } - - public function testGetRow() - { - $matrix = new BitMatrix(102, 5); - - for ($x = 0; $x < 102; $x++) { - if ($x & 3 === 0) { - $matrix->set($x, 2); - } - } - - $array1 = $matrix->getRow(2, null); - $this->assertEquals(102, $array1->getSize()); - - $array2 = new BitArray(60); - $array2 = $matrix->getRow(2, $array2); - $this->assertEquals(102, $array2->getSize()); - - $array3 = new BitArray(200); - $array3 = $matrix->getRow(2, $array3); - $this->assertEquals(200, $array3->getSize()); - - for ($x = 0; $x < 102; $x++) { - $on = ($x & 3 === 0); - - $this->assertEquals($on, $array1->get($x)); - $this->assertEquals($on, $array2->get($x)); - $this->assertEquals($on, $array3->get($x)); - } - } -} \ No newline at end of file diff --git a/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/BitUtilsTest.php b/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/BitUtilsTest.php deleted file mode 100644 index b80ff7df..00000000 --- a/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/BitUtilsTest.php +++ /dev/null @@ -1,30 +0,0 @@ -assertEquals(1, BitUtils::unsignedRightShift(1, 0)); - $this->assertEquals(1, BitUtils::unsignedRightShift(10, 3)); - $this->assertEquals(536870910, BitUtils::unsignedRightShift(-10, 3)); - } - - public function testNumberOfTrailingZeros() - { - $this->assertEquals(32, BitUtils::numberOfTrailingZeros(0)); - $this->assertEquals(1, BitUtils::numberOfTrailingZeros(10)); - $this->assertEquals(0, BitUtils::numberOfTrailingZeros(15)); - $this->assertEquals(2, BitUtils::numberOfTrailingZeros(20)); - } -} \ No newline at end of file diff --git a/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/ErrorCorrectionLevelTest.php b/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/ErrorCorrectionLevelTest.php deleted file mode 100644 index 736e995d..00000000 --- a/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/ErrorCorrectionLevelTest.php +++ /dev/null @@ -1,40 +0,0 @@ -assertEquals(0x0, ErrorCorrectionLevel::M); - $this->assertEquals(0x1, ErrorCorrectionLevel::L); - $this->assertEquals(0x2, ErrorCorrectionLevel::H); - $this->assertEquals(0x3, ErrorCorrectionLevel::Q); - } - - public function testInvalidErrorCorrectionLevelThrowsException() - { - $this->setExpectedException( - 'BaconQrCode\Exception\UnexpectedValueException', - 'Value not a const in enum BaconQrCode\Common\ErrorCorrectionLevel' - ); - new ErrorCorrectionLevel(4); - } -} \ No newline at end of file diff --git a/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/FormatInformationTest.php b/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/FormatInformationTest.php deleted file mode 100644 index 5f6ee58c..00000000 --- a/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/FormatInformationTest.php +++ /dev/null @@ -1,104 +0,0 @@ -unmaskedTestFormatInfo = $this->maskedTestFormatInfo ^ 0x5412; - } - - - public function testBitsDiffering() - { - $this->assertEquals(0, FormatInformation::numBitsDiffering(1, 1)); - $this->assertEquals(1, FormatInformation::numBitsDiffering(0, 2)); - $this->assertEquals(2, FormatInformation::numBitsDiffering(1, 2)); - $this->assertEquals(32, FormatInformation::numBitsDiffering(-1, 0)); - } - - public function testDecode() - { - $expected = FormatInformation::decodeFormatInformation( - $this->maskedTestFormatInfo, - $this->maskedTestFormatInfo - ); - - $this->assertNotNull($expected); - $this->assertEquals(7, $expected->getDataMask()); - $this->assertEquals(ErrorCorrectionLevel::Q, $expected->getErrorCorrectionLevel()->get()); - - $this->assertEquals( - $expected, - FormatInformation::decodeFormatInformation( - $this->unmaskedTestFormatInfo, - $this->maskedTestFormatInfo - ) - ); - } - - public function testDecodeWithBitDifference() - { - $expected = FormatInformation::decodeFormatInformation( - $this->maskedTestFormatInfo, - $this->maskedTestFormatInfo - ); - - $this->assertEquals( - $expected, - FormatInformation::decodeFormatInformation( - $this->maskedTestFormatInfo ^ 0x1, - $this->maskedTestFormatInfo ^ 0x1 - ) - ); - $this->assertEquals( - $expected, - FormatInformation::decodeFormatInformation( - $this->maskedTestFormatInfo ^ 0x3, - $this->maskedTestFormatInfo ^ 0x3 - ) - ); - $this->assertEquals( - $expected, - FormatInformation::decodeFormatInformation( - $this->maskedTestFormatInfo ^ 0x7, - $this->maskedTestFormatInfo ^ 0x7 - ) - ); - $this->assertNull( - FormatInformation::decodeFormatInformation( - $this->maskedTestFormatInfo ^ 0xf, - $this->maskedTestFormatInfo ^ 0xf - ) - ); - } - - public function testDecodeWithMisRead() - { - $expected = FormatInformation::decodeFormatInformation( - $this->maskedTestFormatInfo, - $this->maskedTestFormatInfo - ); - - $this->assertEquals( - $expected, - FormatInformation::decodeFormatInformation( - $this->maskedTestFormatInfo ^ 0x3, - $this->maskedTestFormatInfo ^ 0xf - ) - ); - } -} \ No newline at end of file diff --git a/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/ModeTest.php b/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/ModeTest.php deleted file mode 100644 index 4daab7c3..00000000 --- a/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/ModeTest.php +++ /dev/null @@ -1,42 +0,0 @@ -assertEquals(0x0, Mode::TERMINATOR); - $this->assertEquals(0x1, Mode::NUMERIC); - $this->assertEquals(0x2, Mode::ALPHANUMERIC); - $this->assertEquals(0x4, Mode::BYTE); - $this->assertEquals(0x8, Mode::KANJI); - } - - public function testInvalidModeThrowsException() - { - $this->setExpectedException( - 'BaconQrCode\Exception\UnexpectedValueException', - 'Value not a const in enum BaconQrCode\Common\Mode' - ); - new Mode(10); - } -} \ No newline at end of file diff --git a/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/ReedSolomonCodecTest.php b/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/ReedSolomonCodecTest.php deleted file mode 100644 index 99a6c725..00000000 --- a/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/ReedSolomonCodecTest.php +++ /dev/null @@ -1,107 +0,0 @@ -encode($block, $parity); - - // Copy parity into test blocks - for ($i = 0; $i < $numRoots; $i++) { - $block[$i + $dataSize] = $parity[$i]; - $tBlock[$i + $dataSize] = $parity[$i]; - } - - // Seed with errors - for ($i = 0; $i < $errors; $i++) { - $errorValue = mt_rand(1, $blockSize); - - do { - $errorLocation = mt_rand(0, $blockSize); - } while ($errorLocations[$errorLocation] !== 0); - - $errorLocations[$errorLocation] = 1; - - if (mt_rand(0, 1)) { - $erasures[] = $errorLocation; - } - - $tBlock[$errorLocation] ^= $errorValue; - } - - $erasures = SplFixedArray::fromArray($erasures, false); - - // Decode the errored block - $foundErrors = $codec->decode($tBlock, $erasures); - - if ($errors > 0 && $foundErrors === null) { - $this->assertEquals($block, $tBlock, 'Decoder failed to correct errors'); - } - - $this->assertEquals($errors, $foundErrors, 'Found errors do not equal expected errors'); - - for ($i = 0; $i < $foundErrors; $i++) { - if ($errorLocations[$erasures[$i]] === 0) { - $this->fail(sprintf('Decoder indicates error in location %d without error', $erasures[$i])); - } - } - - $this->assertEquals($block, $tBlock, 'Decoder did not correct errors'); - } - } -} \ No newline at end of file diff --git a/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/VersionTest.php b/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/VersionTest.php deleted file mode 100644 index 8b3fc01f..00000000 --- a/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Common/VersionTest.php +++ /dev/null @@ -1,88 +0,0 @@ -assertNotNull($version); - $this->assertEquals($versionNumber, $version->getVersionNumber()); - $this->assertNotNull($version->getAlignmentPatternCenters()); - - if ($versionNumber > 1) { - $this->assertTrue(count($version->getAlignmentPatternCenters()) > 0); - } - - $this->assertEquals($dimension, $version->getDimensionForVersion()); - $this->assertNotNull($version->getEcBlocksForLevel(new ErrorCorrectionLevel(ErrorCorrectionLevel::H))); - $this->assertNotNull($version->getEcBlocksForLevel(new ErrorCorrectionLevel(ErrorCorrectionLevel::L))); - $this->assertNotNull($version->getEcBlocksForLevel(new ErrorCorrectionLevel(ErrorCorrectionLevel::M))); - $this->assertNotNull($version->getEcBlocksForLevel(new ErrorCorrectionLevel(ErrorCorrectionLevel::Q))); - $this->assertNotNull($version->buildFunctionPattern()); - } - - /** - * @dataProvider versionProvider - * @param integer $versionNumber - * @param integer $dimension - */ - public function testGetProvisionalVersionForDimension($versionNumber, $dimension) - { - $this->assertEquals( - $versionNumber, - Version::getProvisionalVersionForDimension($dimension)->getVersionNumber() - ); - } - - /** - * @dataProvider decodeInformationProvider - * @param integer $expectedVersion - * @param integer $mask - */ - public function testDecodeVersionInformation($expectedVersion, $mask) - { - $version = Version::decodeVersionInformation($mask); - $this->assertNotNull($version); - $this->assertEquals($expectedVersion, $version->getVersionNumber()); - } -} \ No newline at end of file diff --git a/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Encoder/EncoderTest.php b/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Encoder/EncoderTest.php deleted file mode 100644 index 31cdaa4e..00000000 --- a/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Encoder/EncoderTest.php +++ /dev/null @@ -1,468 +0,0 @@ -getMethods(ReflectionMethod::IS_STATIC) as $method) { - $method->setAccessible(true); - $this->methods[$method->getName()] = $method; - } - } - - public function testGetAlphanumericCode() - { - // The first ten code points are numbers. - for ($i = 0; $i < 10; $i++) { - $this->assertEquals($i, $this->methods['getAlphanumericCode']->invoke(null, ord('0') + $i)); - } - - // The next 26 code points are capital alphabet letters. - for ($i = 10; $i < 36; $i++) { - // The first ten code points are numbers - $this->assertEquals($i, $this->methods['getAlphanumericCode']->invoke(null, ord('A') + $i - 10)); - } - - // Others are symbol letters. - $this->assertEquals(36, $this->methods['getAlphanumericCode']->invoke(null, ' ')); - $this->assertEquals(37, $this->methods['getAlphanumericCode']->invoke(null, '$')); - $this->assertEquals(38, $this->methods['getAlphanumericCode']->invoke(null, '%')); - $this->assertEquals(39, $this->methods['getAlphanumericCode']->invoke(null, '*')); - $this->assertEquals(40, $this->methods['getAlphanumericCode']->invoke(null, '+')); - $this->assertEquals(41, $this->methods['getAlphanumericCode']->invoke(null, '-')); - $this->assertEquals(42, $this->methods['getAlphanumericCode']->invoke(null, '.')); - $this->assertEquals(43, $this->methods['getAlphanumericCode']->invoke(null, '/')); - $this->assertEquals(44, $this->methods['getAlphanumericCode']->invoke(null, ':')); - - // Should return -1 for other letters. - $this->assertEquals(-1, $this->methods['getAlphanumericCode']->invoke(null, 'a')); - $this->assertEquals(-1, $this->methods['getAlphanumericCode']->invoke(null, '#')); - $this->assertEquals(-1, $this->methods['getAlphanumericCode']->invoke(null, "\0")); - } - - public function testChooseMode() - { - // Numeric mode - $this->assertSame(Mode::NUMERIC, $this->methods['chooseMode']->invoke(null, '0')->get()); - $this->assertSame(Mode::NUMERIC, $this->methods['chooseMode']->invoke(null, '0123456789')->get()); - - // Alphanumeric mode - $this->assertSame(Mode::ALPHANUMERIC, $this->methods['chooseMode']->invoke(null, 'A')->get()); - $this->assertSame(Mode::ALPHANUMERIC, $this->methods['chooseMode']->invoke(null, '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:')->get()); - - // 8-bit byte mode - $this->assertSame(Mode::BYTE, $this->methods['chooseMode']->invoke(null, 'a')->get()); - $this->assertSame(Mode::BYTE, $this->methods['chooseMode']->invoke(null, '#')->get()); - $this->assertSame(Mode::BYTE, $this->methods['chooseMode']->invoke(null, '')->get()); - - // AIUE in Hiragana in SHIFT-JIS - $this->assertSame(Mode::BYTE, $this->methods['chooseMode']->invoke(null, "\x8\xa\x8\xa\x8\xa\x8\xa6")->get()); - - // Nihon in Kanji in SHIFT-JIS - $this->assertSame(Mode::BYTE, $this->methods['chooseMode']->invoke(null, "\x9\xf\x9\x7b")->get()); - - // Sou-Utso-Byou in Kanji in SHIFT-JIS - $this->assertSame(Mode::BYTE, $this->methods['chooseMode']->invoke(null, "\xe\x4\x9\x5\x9\x61")->get()); - } - - public function testEncode() - { - $qrCode = Encoder::encode('ABCDEF', new ErrorCorrectionLevel(ErrorCorrectionLevel::H)); - $expected = "<<\n" - . " mode: ALPHANUMERIC\n" - . " ecLevel: H\n" - . " version: 1\n" - . " maskPattern: 0\n" - . " matrix:\n" - . " 1 1 1 1 1 1 1 0 1 1 1 1 0 0 1 1 1 1 1 1 1\n" - . " 1 0 0 0 0 0 1 0 0 1 1 1 0 0 1 0 0 0 0 0 1\n" - . " 1 0 1 1 1 0 1 0 0 1 0 1 1 0 1 0 1 1 1 0 1\n" - . " 1 0 1 1 1 0 1 0 1 1 1 0 1 0 1 0 1 1 1 0 1\n" - . " 1 0 1 1 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1\n" - . " 1 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 0 0 1\n" - . " 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1\n" - . " 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0\n" - . " 0 0 1 0 1 1 1 0 1 1 0 0 1 1 0 0 0 1 0 0 1\n" - . " 1 0 1 1 1 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0\n" - . " 0 0 1 1 0 0 1 0 1 0 0 0 1 0 1 0 1 0 1 1 0\n" - . " 1 1 0 1 0 1 0 1 1 1 0 1 0 1 0 0 0 0 0 1 0\n" - . " 0 0 1 1 0 1 1 1 1 0 0 0 1 0 1 0 1 1 1 1 0\n" - . " 0 0 0 0 0 0 0 0 1 0 0 1 1 1 0 1 0 1 0 0 0\n" - . " 1 1 1 1 1 1 1 0 0 0 1 0 1 0 1 1 0 0 0 0 1\n" - . " 1 0 0 0 0 0 1 0 1 1 1 1 0 1 0 1 1 1 1 0 1\n" - . " 1 0 1 1 1 0 1 0 1 0 1 1 0 1 0 1 0 0 0 0 1\n" - . " 1 0 1 1 1 0 1 0 0 1 1 0 1 1 1 1 0 1 0 1 0\n" - . " 1 0 1 1 1 0 1 0 1 0 0 0 1 0 1 0 1 1 1 0 1\n" - . " 1 0 0 0 0 0 1 0 0 1 1 0 1 1 0 1 0 0 0 1 1\n" - . " 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 0 1 0 1\n" - . ">>\n"; - - $this->assertEquals($expected, $qrCode->__toString()); - } - - public function testSimpleUtf8Eci() - { - $qrCode = Encoder::encode('hello', new ErrorCorrectionLevel(ErrorCorrectionLevel::H), 'utf-8'); - $expected = "<<\n" - . " mode: BYTE\n" - . " ecLevel: H\n" - . " version: 1\n" - . " maskPattern: 3\n" - . " matrix:\n" - . " 1 1 1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 1 1\n" - . " 1 0 0 0 0 0 1 0 0 0 1 0 1 0 1 0 0 0 0 0 1\n" - . " 1 0 1 1 1 0 1 0 0 1 0 1 0 0 1 0 1 1 1 0 1\n" - . " 1 0 1 1 1 0 1 0 0 1 1 0 1 0 1 0 1 1 1 0 1\n" - . " 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1\n" - . " 1 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1\n" - . " 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1\n" - . " 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0\n" - . " 0 0 1 1 0 0 1 1 1 1 0 0 0 1 1 0 1 0 0 0 0\n" - . " 0 0 1 1 1 0 0 0 0 0 1 1 0 0 0 1 0 1 1 1 0\n" - . " 0 1 0 1 0 1 1 1 0 1 0 1 0 0 0 0 0 1 1 1 1\n" - . " 1 1 0 0 1 0 0 1 1 0 0 1 1 1 1 0 1 0 1 1 0\n" - . " 0 0 0 0 1 0 1 1 1 1 0 0 0 0 0 1 0 0 1 0 0\n" - . " 0 0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 1 0 0 0 1\n" - . " 1 1 1 1 1 1 1 0 1 1 1 0 1 0 1 1 0 0 1 0 0\n" - . " 1 0 0 0 0 0 1 0 0 0 1 0 0 1 1 1 1 1 1 0 1\n" - . " 1 0 1 1 1 0 1 0 0 1 0 0 0 0 1 1 0 0 0 0 0\n" - . " 1 0 1 1 1 0 1 0 1 1 1 0 1 0 0 0 1 1 0 0 0\n" - . " 1 0 1 1 1 0 1 0 1 1 0 0 0 1 0 0 1 0 0 0 0\n" - . " 1 0 0 0 0 0 1 0 0 0 0 1 1 0 1 0 1 0 1 1 0\n" - . " 1 1 1 1 1 1 1 0 0 1 0 1 1 1 0 1 1 0 0 0 0\n" - . ">>\n"; - - $this->assertEquals($expected, $qrCode->__toString()); - } - - public function testAppendModeInfo() - { - $bits = new BitArray(); - $this->methods['appendModeInfo']->invoke(null, new Mode(Mode::NUMERIC), $bits); - $this->assertEquals(' ...X', $bits->__toString()); - } - - public function testAppendLengthInfo() - { - // 1 letter (1/1), 10 bits. - $bits = new BitArray(); - $this->methods['appendLengthInfo']->invoke( - null, - 1, - Version::getVersionForNumber(1), - new Mode(Mode::NUMERIC), - $bits - ); - $this->assertEquals(' ........ .X', $bits->__toString()); - - // 2 letters (2/1), 11 bits. - $bits = new BitArray(); - $this->methods['appendLengthInfo']->invoke( - null, - 2, - Version::getVersionForNumber(10), - new Mode(Mode::ALPHANUMERIC), - $bits - ); - $this->assertEquals(' ........ .X.', $bits->__toString()); - - // 255 letters (255/1), 16 bits. - $bits = new BitArray(); - $this->methods['appendLengthInfo']->invoke( - null, - 255, - Version::getVersionForNumber(27), - new Mode(Mode::BYTE), - $bits - ); - $this->assertEquals(' ........ XXXXXXXX', $bits->__toString()); - - // 512 letters (1024/2), 12 bits. - $bits = new BitArray(); - $this->methods['appendLengthInfo']->invoke( - null, - 512, - Version::getVersionForNumber(40), - new Mode(Mode::KANJI), - $bits - ); - $this->assertEquals(' ..X..... ....', $bits->__toString()); - } - - public function testAppendBytes() - { - // Should use appendNumericBytes. - // 1 = 01 = 0001 in 4 bits. - $bits = new BitArray(); - $this->methods['appendBytes']->invoke( - null, - '1', - new Mode(Mode::NUMERIC), - $bits, - Encoder::DEFAULT_BYTE_MODE_ECODING - ); - $this->assertEquals(' ...X', $bits->__toString()); - - // Should use appendAlphaNumericBytes. - // A = 10 = 0xa = 001010 in 6 bits. - $bits = new BitArray(); - $this->methods['appendBytes']->invoke( - null, - 'A', - new Mode(Mode::ALPHANUMERIC), - $bits, - Encoder::DEFAULT_BYTE_MODE_ECODING - ); - $this->assertEquals(' ..X.X.', $bits->__toString()); - - // Should use append8BitBytes. - // 0x61, 0x62, 0x63 - $bits = new BitArray(); - $this->methods['appendBytes']->invoke( - null, - 'abc', - new Mode(Mode::BYTE), - $bits, - Encoder::DEFAULT_BYTE_MODE_ECODING - ); - $this->assertEquals(' .XX....X .XX...X. .XX...XX', $bits->__toString()); - - // Should use appendKanjiBytes. - // 0x93, 0x5f - $bits = new BitArray(); - $this->methods['appendBytes']->invoke( - null, - "\x93\x5f", - new Mode(Mode::KANJI), - $bits, - Encoder::DEFAULT_BYTE_MODE_ECODING - ); - $this->assertEquals(' .XX.XX.. XXXXX', $bits->__toString()); - - // Lower letters such as 'a' cannot be encoded in alphanumeric mode. - $this->setExpectedException( - 'BaconQrCode\Exception\WriterException', - 'Invalid alphanumeric code' - ); - $this->methods['appendBytes']->invoke( - null, - "a", - new Mode(Mode::ALPHANUMERIC), - $bits, - Encoder::DEFAULT_BYTE_MODE_ECODING - ); - } - - public function testTerminateBits() - { - $bits = new BitArray(); - $this->methods['terminateBits']->invoke(null, 0, $bits); - $this->assertEquals('', $bits->__toString()); - - $bits = new BitArray(); - $this->methods['terminateBits']->invoke(null, 1, $bits); - $this->assertEquals(' ........', $bits->__toString()); - - $bits = new BitArray(); - $bits->appendBits(0, 3); - $this->methods['terminateBits']->invoke(null, 1, $bits); - $this->assertEquals(' ........', $bits->__toString()); - - $bits = new BitArray(); - $bits->appendBits(0, 5); - $this->methods['terminateBits']->invoke(null, 1, $bits); - $this->assertEquals(' ........', $bits->__toString()); - - $bits = new BitArray(); - $bits->appendBits(0, 8); - $this->methods['terminateBits']->invoke(null, 1, $bits); - $this->assertEquals(' ........', $bits->__toString()); - - $bits = new BitArray(); - $this->methods['terminateBits']->invoke(null, 2, $bits); - $this->assertEquals(' ........ XXX.XX..', $bits->__toString()); - - $bits = new BitArray(); - $bits->appendBits(0, 1); - $this->methods['terminateBits']->invoke(null, 3, $bits); - $this->assertEquals(' ........ XXX.XX.. ...X...X', $bits->__toString()); - } - - public function testGetNumDataBytesAndNumEcBytesForBlockId() - { - // Version 1-H. - list($numDataBytes, $numEcBytes) = $this->methods['getNumDataBytesAndNumEcBytesForBlockId']->invoke(null, 26, 9, 1, 0); - $this->assertEquals(9, $numDataBytes); - $this->assertEquals(17, $numEcBytes); - - // Version 3-H. 2 blocks. - list($numDataBytes, $numEcBytes) = $this->methods['getNumDataBytesAndNumEcBytesForBlockId']->invoke(null, 70, 26, 2, 0); - $this->assertEquals(13, $numDataBytes); - $this->assertEquals(22, $numEcBytes); - list($numDataBytes, $numEcBytes) = $this->methods['getNumDataBytesAndNumEcBytesForBlockId']->invoke(null, 70, 26, 2, 1); - $this->assertEquals(13, $numDataBytes); - $this->assertEquals(22, $numEcBytes); - - // Version 7-H. (4 + 1) blocks. - list($numDataBytes, $numEcBytes) = $this->methods['getNumDataBytesAndNumEcBytesForBlockId']->invoke(null, 196, 66, 5, 0); - $this->assertEquals(13, $numDataBytes); - $this->assertEquals(26, $numEcBytes); - list($numDataBytes, $numEcBytes) = $this->methods['getNumDataBytesAndNumEcBytesForBlockId']->invoke(null, 196, 66, 5, 4); - $this->assertEquals(14, $numDataBytes); - $this->assertEquals(26, $numEcBytes); - - // Version 40-H. (20 + 61) blocks. - list($numDataBytes, $numEcBytes) = $this->methods['getNumDataBytesAndNumEcBytesForBlockId']->invoke(null, 3706, 1276, 81, 0); - $this->assertEquals(15, $numDataBytes); - $this->assertEquals(30, $numEcBytes); - list($numDataBytes, $numEcBytes) = $this->methods['getNumDataBytesAndNumEcBytesForBlockId']->invoke(null, 3706, 1276, 81, 20); - $this->assertEquals(16, $numDataBytes); - $this->assertEquals(30, $numEcBytes); - list($numDataBytes, $numEcBytes) = $this->methods['getNumDataBytesAndNumEcBytesForBlockId']->invoke(null, 3706, 1276, 81, 80); - $this->assertEquals(16, $numDataBytes); - $this->assertEquals(30, $numEcBytes); - } - - public function testInterleaveWithEcBytes() - { - $dataBytes = SplFixedArray::fromArray(array(32, 65, 205, 69, 41, 220, 46, 128, 236), false); - $in = new BitArray(); - - foreach ($dataBytes as $dataByte) { - $in->appendBits($dataByte, 8); - } - - $outBits = $this->methods['interleaveWithEcBytes']->invoke(null, $in, 26, 9, 1); - $expected = SplFixedArray::fromArray(array( - // Data bytes. - 32, 65, 205, 69, 41, 220, 46, 128, 236, - // Error correction bytes. - 42, 159, 74, 221, 244, 169, 239, 150, 138, 70, 237, 85, 224, 96, 74, 219, 61, - ), false); - - $out = $outBits->toBytes(0, count($expected)); - - $this->assertEquals($expected, $out); - } - - public function testAppendNumericBytes() - { - // 1 = 01 = 0001 in 4 bits. - $bits = new BitArray(); - $this->methods['appendNumericBytes']->invoke(null, '1', $bits); - $this->assertEquals(' ...X', $bits->__toString()); - - // 12 = 0xc = 0001100 in 7 bits. - $bits = new BitArray(); - $this->methods['appendNumericBytes']->invoke(null, '12', $bits); - $this->assertEquals(' ...XX..', $bits->__toString()); - - // 123 = 0x7b = 0001111011 in 10 bits. - $bits = new BitArray(); - $this->methods['appendNumericBytes']->invoke(null, '123', $bits); - $this->assertEquals(' ...XXXX. XX', $bits->__toString()); - - // 1234 = "123" + "4" = 0001111011 + 0100 in 14 bits. - $bits = new BitArray(); - $this->methods['appendNumericBytes']->invoke(null, '1234', $bits); - $this->assertEquals(' ...XXXX. XX.X..', $bits->__toString()); - - // Empty - $bits = new BitArray(); - $this->methods['appendNumericBytes']->invoke(null, '', $bits); - $this->assertEquals('', $bits->__toString()); - } - - public function testAppendAlphanumericBytes() - { - $bits = new BitArray(); - $this->methods['appendAlphanumericBytes']->invoke(null, 'A', $bits); - $this->assertEquals(' ..X.X.', $bits->__toString()); - - $bits = new BitArray(); - $this->methods['appendAlphanumericBytes']->invoke(null, 'AB', $bits); - $this->assertEquals(' ..XXX..X X.X', $bits->__toString()); - - $bits = new BitArray(); - $this->methods['appendAlphanumericBytes']->invoke(null, 'ABC', $bits); - $this->assertEquals(' ..XXX..X X.X..XX. .', $bits->__toString()); - - // Empty - $bits = new BitArray(); - $this->methods['appendAlphanumericBytes']->invoke(null, '', $bits); - $this->assertEquals('', $bits->__toString()); - - // Invalid data - $this->setExpectedException('BaconQrCode\Exception\WriterException', 'Invalid alphanumeric code'); - $bits = new BitArray(); - $this->methods['appendAlphanumericBytes']->invoke(null, 'abc', $bits); - } - - public function testAppend8BitBytes() - { - // 0x61, 0x62, 0x63 - $bits = new BitArray(); - $this->methods['append8BitBytes']->invoke(null, 'abc', $bits, Encoder::DEFAULT_BYTE_MODE_ECODING); - $this->assertEquals(' .XX....X .XX...X. .XX...XX', $bits->__toString()); - - // Empty - $bits = new BitArray(); - $this->methods['append8BitBytes']->invoke(null, '', $bits, Encoder::DEFAULT_BYTE_MODE_ECODING); - $this->assertEquals('', $bits->__toString()); - } - - public function testAppendKanjiBytes() - { - // Numbers are from page 21 of JISX0510:2004 - $bits = new BitArray(); - $this->methods['appendKanjiBytes']->invoke(null, "\x93\x5f", $bits); - $this->assertEquals(' .XX.XX.. XXXXX', $bits->__toString()); - - $this->methods['appendKanjiBytes']->invoke(null, "\xe4\xaa", $bits); - $this->assertEquals(' .XX.XX.. XXXXXXX. X.X.X.X. X.', $bits->__toString()); - } - - public function testGenerateEcBytes() - { - // Numbers are from http://www.swetake.com/qr/qr3.html and - // http://www.swetake.com/qr/qr9.html - $dataBytes = SplFixedArray::fromArray(array(32, 65, 205, 69, 41, 220, 46, 128, 236), false); - $ecBytes = $this->methods['generateEcBytes']->invoke(null, $dataBytes, 17); - $expected = SplFixedArray::fromArray(array(42, 159, 74, 221, 244, 169, 239, 150, 138, 70, 237, 85, 224, 96, 74, 219, 61), false); - $this->assertEquals($expected, $ecBytes); - - $dataBytes = SplFixedArray::fromArray(array(67, 70, 22, 38, 54, 70, 86, 102, 118, 134, 150, 166, 182, 198, 214), false); - $ecBytes = $this->methods['generateEcBytes']->invoke(null, $dataBytes, 18); - $expected = SplFixedArray::fromArray(array(175, 80, 155, 64, 178, 45, 214, 233, 65, 209, 12, 155, 117, 31, 140, 214, 27, 187), false); - $this->assertEquals($expected, $ecBytes); - - // High-order zero coefficient case. - $dataBytes = SplFixedArray::fromArray(array(32, 49, 205, 69, 42, 20, 0, 236, 17), false); - $ecBytes = $this->methods['generateEcBytes']->invoke(null, $dataBytes, 17); - $expected = SplFixedArray::fromArray(array(0, 3, 130, 179, 194, 0, 55, 211, 110, 79, 98, 72, 170, 96, 211, 137, 213), false); - $this->assertEquals($expected, $ecBytes); - } -} \ No newline at end of file diff --git a/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Encoder/MaskUtilTest.php b/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Encoder/MaskUtilTest.php deleted file mode 100644 index a5c38656..00000000 --- a/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Encoder/MaskUtilTest.php +++ /dev/null @@ -1,281 +0,0 @@ -fail('Data mask bit did not match'); - } - } - } - } - - public function testApplyMaskPenaltyRule1() - { - $matrix = new ByteMatrix(4, 1); - $matrix->set(0, 0, 0); - $matrix->set(1, 0, 0); - $matrix->set(2, 0, 0); - $matrix->set(3, 0, 0); - - $this->assertEquals(0, MaskUtil::applyMaskPenaltyRule1($matrix)); - - // Horizontal - $matrix = new ByteMatrix(6, 1); - $matrix->set(0, 0, 0); - $matrix->set(1, 0, 0); - $matrix->set(2, 0, 0); - $matrix->set(3, 0, 0); - $matrix->set(4, 0, 0); - $matrix->set(5, 0, 1); - $this->assertEquals(3, MaskUtil::applyMaskPenaltyRule1($matrix)); - $matrix->set(5, 0, 0); - $this->assertEquals(4, MaskUtil::applyMaskPenaltyRule1($matrix)); - - // Vertical - $matrix = new ByteMatrix(1, 6); - $matrix->set(0, 0, 0); - $matrix->set(0, 1, 0); - $matrix->set(0, 2, 0); - $matrix->set(0, 3, 0); - $matrix->set(0, 4, 0); - $matrix->set(0, 5, 1); - $this->assertEquals(3, MaskUtil::applyMaskPenaltyRule1($matrix)); - $matrix->set(0, 5, 0); - $this->assertEquals(4, MaskUtil::applyMaskPenaltyRule1($matrix)); - } - - public function testApplyMaskPenaltyRule2() - { - $matrix = new ByteMatrix(1, 1); - $matrix->set(0, 0, 0); - $this->assertEquals(0, MaskUtil::applyMaskPenaltyRule2($matrix)); - - $matrix = new ByteMatrix(2, 2); - $matrix->set(0, 0, 0); - $matrix->set(1, 0, 0); - $matrix->set(0, 1, 0); - $matrix->set(1, 1, 1); - $this->assertEquals(0, MaskUtil::applyMaskPenaltyRule2($matrix)); - - $matrix = new ByteMatrix(2, 2); - $matrix->set(0, 0, 0); - $matrix->set(1, 0, 0); - $matrix->set(0, 1, 0); - $matrix->set(1, 1, 0); - $this->assertEquals(3, MaskUtil::applyMaskPenaltyRule2($matrix)); - - $matrix = new ByteMatrix(3, 3); - $matrix->set(0, 0, 0); - $matrix->set(1, 0, 0); - $matrix->set(2, 0, 0); - $matrix->set(0, 1, 0); - $matrix->set(1, 1, 0); - $matrix->set(2, 1, 0); - $matrix->set(0, 2, 0); - $matrix->set(1, 2, 0); - $matrix->set(2, 2, 0); - $this->assertEquals(3 * 4, MaskUtil::applyMaskPenaltyRule2($matrix)); - } - - public function testApplyMaskPenalty3() - { - // Horizontal 00001011101 - $matrix = new ByteMatrix(11, 1); - $matrix->set(0, 0, 0); - $matrix->set(1, 0, 0); - $matrix->set(2, 0, 0); - $matrix->set(3, 0, 0); - $matrix->set(4, 0, 1); - $matrix->set(5, 0, 0); - $matrix->set(6, 0, 1); - $matrix->set(7, 0, 1); - $matrix->set(8, 0, 1); - $matrix->set(9, 0, 0); - $matrix->set(10, 0, 1); - $this->assertEquals(40, MaskUtil::applyMaskPenaltyRule3($matrix)); - - // Horizontal 10111010000 - $matrix = new ByteMatrix(11, 1); - $matrix->set(0, 0, 1); - $matrix->set(1, 0, 0); - $matrix->set(2, 0, 1); - $matrix->set(3, 0, 1); - $matrix->set(4, 0, 1); - $matrix->set(5, 0, 0); - $matrix->set(6, 0, 1); - $matrix->set(7, 0, 0); - $matrix->set(8, 0, 0); - $matrix->set(9, 0, 0); - $matrix->set(10, 0, 0); - $this->assertEquals(40, MaskUtil::applyMaskPenaltyRule3($matrix)); - - // Vertical 00001011101 - $matrix = new ByteMatrix(1, 11); - $matrix->set(0, 0, 0); - $matrix->set(0, 1, 0); - $matrix->set(0, 2, 0); - $matrix->set(0, 3, 0); - $matrix->set(0, 4, 1); - $matrix->set(0, 5, 0); - $matrix->set(0, 6, 1); - $matrix->set(0, 7, 1); - $matrix->set(0, 8, 1); - $matrix->set(0, 9, 0); - $matrix->set(0, 10, 1); - $this->assertEquals(40, MaskUtil::applyMaskPenaltyRule3($matrix)); - - // Vertical 10111010000 - $matrix = new ByteMatrix(1, 11); - $matrix->set(0, 0, 1); - $matrix->set(0, 1, 0); - $matrix->set(0, 2, 1); - $matrix->set(0, 3, 1); - $matrix->set(0, 4, 1); - $matrix->set(0, 5, 0); - $matrix->set(0, 6, 1); - $matrix->set(0, 7, 0); - $matrix->set(0, 8, 0); - $matrix->set(0, 9, 0); - $matrix->set(0, 10, 0); - $this->assertEquals(40, MaskUtil::applyMaskPenaltyRule3($matrix)); - } - - public function testApplyMaskPenaltyRule4() - { - // Dark cell ratio = 0% - $matrix = new ByteMatrix(1, 1); - $matrix->set(0, 0, 0); - $this->assertEquals(100, MaskUtil::applyMaskPenaltyRule4($matrix)); - - // Dark cell ratio = 5% - $matrix = new ByteMatrix(2, 1); - $matrix->set(0, 0, 0); - $matrix->set(0, 0, 1); - $this->assertEquals(0, MaskUtil::applyMaskPenaltyRule4($matrix)); - - // Dark cell ratio = 66.67% - $matrix = new ByteMatrix(6, 1); - $matrix->set(0, 0, 0); - $matrix->set(1, 0, 1); - $matrix->set(2, 0, 1); - $matrix->set(3, 0, 1); - $matrix->set(4, 0, 1); - $matrix->set(5, 0, 0); - $this->assertEquals(30, MaskUtil::applyMaskPenaltyRule4($matrix)); - } -} \ No newline at end of file diff --git a/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Encoder/MatrixUtilTest.php b/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Encoder/MatrixUtilTest.php deleted file mode 100644 index bf3544f0..00000000 --- a/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Encoder/MatrixUtilTest.php +++ /dev/null @@ -1,336 +0,0 @@ -getMethods(ReflectionMethod::IS_STATIC) as $method) { - $method->setAccessible(true); - $this->methods[$method->getName()] = $method; - } - } - - public function testToString() - { - $matrix= new ByteMatrix(3, 3); - $matrix->set(0, 0, 0); - $matrix->set(1, 0, 1); - $matrix->set(2, 0, 0); - $matrix->set(0, 1, 1); - $matrix->set(1, 1, 0); - $matrix->set(2, 1, 1); - $matrix->set(0, 2, -1); - $matrix->set(1, 2, -1); - $matrix->set(2, 2, -1); - - $expected = " 0 1 0\n 1 0 1\n \n"; - $this->assertEquals($expected, $matrix->__toString()); - } - - public function testClearMatrix() - { - $matrix = new ByteMatrix(2, 2); - MatrixUtil::clearMatrix($matrix); - - $this->assertEquals(-1, $matrix->get(0, 0)); - $this->assertEquals(-1, $matrix->get(1, 0)); - $this->assertEquals(-1, $matrix->get(0, 1)); - $this->assertEquals(-1, $matrix->get(1, 1)); - } - - public function testEmbedBasicPatterns1() - { - $matrix = new ByteMatrix(21, 21); - MatrixUtil::clearMatrix($matrix); - $this->methods['embedBasicPatterns']->invoke( - null, - Version::getVersionForNumber(1), - $matrix - ); - $expected = " 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1\n" - . " 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1\n" - . " 1 0 1 1 1 0 1 0 0 1 0 1 1 1 0 1\n" - . " 1 0 1 1 1 0 1 0 0 1 0 1 1 1 0 1\n" - . " 1 0 1 1 1 0 1 0 0 1 0 1 1 1 0 1\n" - . " 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1\n" - . " 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1\n" - . " 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n" - . " 1 \n" - . " 0 \n" - . " 1 \n" - . " 0 \n" - . " 1 \n" - . " 0 0 0 0 0 0 0 0 1 \n" - . " 1 1 1 1 1 1 1 0 \n" - . " 1 0 0 0 0 0 1 0 \n" - . " 1 0 1 1 1 0 1 0 \n" - . " 1 0 1 1 1 0 1 0 \n" - . " 1 0 1 1 1 0 1 0 \n" - . " 1 0 0 0 0 0 1 0 \n" - . " 1 1 1 1 1 1 1 0 \n"; - - $this->assertEquals($expected, $matrix->__toString()); - } - - public function testEmbedBasicPatterns2() - { - $matrix = new ByteMatrix(25, 25); - MatrixUtil::clearMatrix($matrix); - $this->methods['embedBasicPatterns']->invoke( - null, - Version::getVersionForNumber(2), - $matrix - ); - $expected = " 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1\n" - . " 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1\n" - . " 1 0 1 1 1 0 1 0 0 1 0 1 1 1 0 1\n" - . " 1 0 1 1 1 0 1 0 0 1 0 1 1 1 0 1\n" - . " 1 0 1 1 1 0 1 0 0 1 0 1 1 1 0 1\n" - . " 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1\n" - . " 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1\n" - . " 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n" - . " 1 \n" - . " 0 \n" - . " 1 \n" - . " 0 \n" - . " 1 \n" - . " 0 \n" - . " 1 \n" - . " 0 \n" - . " 1 1 1 1 1 1 \n" - . " 0 0 0 0 0 0 0 0 1 1 0 0 0 1 \n" - . " 1 1 1 1 1 1 1 0 1 0 1 0 1 \n" - . " 1 0 0 0 0 0 1 0 1 0 0 0 1 \n" - . " 1 0 1 1 1 0 1 0 1 1 1 1 1 \n" - . " 1 0 1 1 1 0 1 0 \n" - . " 1 0 1 1 1 0 1 0 \n" - . " 1 0 0 0 0 0 1 0 \n" - . " 1 1 1 1 1 1 1 0 \n"; - - $this->assertEquals($expected, $matrix->__toString()); - } - - public function testEmbedTypeInfo() - { - $matrix = new ByteMatrix(21, 21); - MatrixUtil::clearMatrix($matrix); - $this->methods['embedTypeInfo']->invoke( - null, - new ErrorCorrectionLevel(ErrorCorrectionLevel::M), - 5, - $matrix - ); - $expected = " 0 \n" - . " 1 \n" - . " 1 \n" - . " 1 \n" - . " 0 \n" - . " 0 \n" - . " \n" - . " 1 \n" - . " 1 0 0 0 0 0 0 1 1 1 0 0 1 1 1 0\n" - . " \n" - . " \n" - . " \n" - . " \n" - . " \n" - . " 0 \n" - . " 0 \n" - . " 0 \n" - . " 0 \n" - . " 0 \n" - . " 0 \n" - . " 1 \n"; - - $this->assertEquals($expected, $matrix->__toString()); - } - - public function testEmbedVersionInfo() - { - $matrix = new ByteMatrix(21, 21); - MatrixUtil::clearMatrix($matrix); - $this->methods['maybeEmbedVersionInfo']->invoke( - null, - Version::getVersionForNumber(7), - $matrix - ); - $expected = " 0 0 1 \n" - . " 0 1 0 \n" - . " 0 1 0 \n" - . " 0 1 1 \n" - . " 1 1 1 \n" - . " 0 0 0 \n" - . " \n" - . " \n" - . " \n" - . " \n" - . " 0 0 0 0 1 0 \n" - . " 0 1 1 1 1 0 \n" - . " 1 0 0 1 1 0 \n" - . " \n" - . " \n" - . " \n" - . " \n" - . " \n" - . " \n" - . " \n" - . " \n"; - - $this->assertEquals($expected, $matrix->__toString()); - } - - public function testEmbedDataBits() - { - $matrix = new ByteMatrix(21, 21); - MatrixUtil::clearMatrix($matrix); - $this->methods['embedBasicPatterns']->invoke( - null, - Version::getVersionForNumber(1), - $matrix - ); - - $bits = new BitArray(); - $this->methods['embedDataBits']->invoke( - null, - $bits, - -1, - $matrix - ); - - $expected = " 1 1 1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- } - - public function testBuildMatrix() - { - $bytes = array( - 32, 65, 205, 69, 41, 220, 46, 128, 236, 42, 159, 74, 221, 244, 169, - 239, 150, 138, 70, 237, 85, 224, 96, 74, 219 , 61 - ); - $bits = new BitArray(); - - foreach ($bytes as $byte) { - $bits->appendBits($byte, 8); - } - - $matrix = new ByteMatrix(21, 21); - MatrixUtil::buildMatrix( - $bits, - new ErrorCorrectionLevel(ErrorCorrectionLevel::H), - Version::getVersionForNumber(1), - 3, - $matrix - ); - - $expected = " 1 1 1 1 1 1 1 0 0 1 1 0 0 0 1 1 1 1 1 1 1\n" - . " 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 1\n" - . " 1 0 1 1 1 0 1 0 0 0 0 1 0 0 1 0 1 1 1 0 1\n" - . " 1 0 1 1 1 0 1 0 0 1 1 0 0 0 1 0 1 1 1 0 1\n" - . " 1 0 1 1 1 0 1 0 1 1 0 0 1 0 1 0 1 1 1 0 1\n" - . " 1 0 0 0 0 0 1 0 0 0 1 1 1 0 1 0 0 0 0 0 1\n" - . " 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1\n" - . " 0 0 0 0 0 0 0 0 1 1 0 1 1 0 0 0 0 0 0 0 0\n" - . " 0 0 1 1 0 0 1 1 1 0 0 1 1 1 1 0 1 0 0 0 0\n" - . " 1 0 1 0 1 0 0 0 0 0 1 1 1 0 0 1 0 1 1 1 0\n" - . " 1 1 1 1 0 1 1 0 1 0 1 1 1 0 0 1 1 1 0 1 0\n" - . " 1 0 1 0 1 1 0 1 1 1 0 0 1 1 1 0 0 1 0 1 0\n" - . " 0 0 1 0 0 1 1 1 0 0 0 0 0 0 1 0 1 1 1 1 1\n" - . " 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 1 0 1 1\n" - . " 1 1 1 1 1 1 1 0 1 1 1 1 0 0 0 0 1 0 1 1 0\n" - . " 1 0 0 0 0 0 1 0 0 0 0 1 0 1 1 1 0 0 0 0 0\n" - . " 1 0 1 1 1 0 1 0 0 1 0 0 1 1 0 0 1 0 0 1 1\n" - . " 1 0 1 1 1 0 1 0 1 1 0 1 0 0 0 0 0 1 1 1 0\n" - . " 1 0 1 1 1 0 1 0 1 1 1 1 0 0 0 0 1 1 1 0 0\n" - . " 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0\n" - . " 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 0 1 0 0 1 0\n"; - - $this->assertEquals($expected, $matrix->__toString()); - } - - public function testFindMsbSet() - { - $this->assertEquals(0, $this->methods['findMsbSet']->invoke(null, 0)); - $this->assertEquals(1, $this->methods['findMsbSet']->invoke(null, 1)); - $this->assertEquals(8, $this->methods['findMsbSet']->invoke(null, 0x80)); - $this->assertEquals(32, $this->methods['findMsbSet']->invoke(null, 0x80000000)); - } - - public function testCalculateBchCode() - { - // Encoding of type information. - // From Appendix C in JISX0510:2004 (p 65) - $this->assertEquals(0xdc, $this->methods['calculateBchCode']->invoke(null, 5, 0x537)); - // From http://www.swetake.com/qr/qr6.html - $this->assertEquals(0x1c2, $this->methods['calculateBchCode']->invoke(null, 0x13, 0x537)); - // From http://www.swetake.com/qr/qr11.html - $this->assertEquals(0x214, $this->methods['calculateBchCode']->invoke(null, 0x1b, 0x537)); - - // Encoding of version information. - // From Appendix D in JISX0510:2004 (p 68) - $this->assertEquals(0xc94, $this->methods['calculateBchCode']->invoke(null, 7, 0x1f25)); - $this->assertEquals(0x5bc, $this->methods['calculateBchCode']->invoke(null, 8, 0x1f25)); - $this->assertEquals(0xa99, $this->methods['calculateBchCode']->invoke(null, 9, 0x1f25)); - $this->assertEquals(0x4d3, $this->methods['calculateBchCode']->invoke(null, 10, 0x1f25)); - $this->assertEquals(0x9a6, $this->methods['calculateBchCode']->invoke(null, 20, 0x1f25)); - $this->assertEquals(0xd75, $this->methods['calculateBchCode']->invoke(null, 30, 0x1f25)); - $this->assertEquals(0xc69, $this->methods['calculateBchCode']->invoke(null, 40, 0x1f25)); - } - - public function testMakeVersionInfoBits() - { - // From Appendix D in JISX0510:2004 (p 68) - $bits = new BitArray(); - $this->methods['makeVersionInfoBits']->invoke(null, Version::getVersionForNumber(7), $bits); - $this->assertEquals(' ...XXXXX ..X..X.X ..', $bits->__toString()); - } - - public function testMakeTypeInfoBits() - { - // From Appendix D in JISX0510:2004 (p 68) - $bits = new BitArray(); - $this->methods['makeTypeInfoBits']->invoke(null, new ErrorCorrectionLevel(ErrorCorrectionLevel::M), 5, $bits); - $this->assertEquals(' X......X X..XXX.', $bits->__toString()); - } -} \ No newline at end of file diff --git a/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Renderer/Text/HtmlTest.php b/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Renderer/Text/HtmlTest.php deleted file mode 100644 index 0c69dd2e..00000000 --- a/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Renderer/Text/HtmlTest.php +++ /dev/null @@ -1,99 +0,0 @@ -renderer = new Html(); - $this->writer = new Writer($this->renderer); - } - - public function testBasicRender() - { - $content = 'foobar'; - $expected = - '
' .
-            "                       \n" .
-            " ███████ █████ ███████ \n" .
-            " â–ˆ     â–ˆ  â–ˆ â–ˆ  â–ˆ     â–ˆ \n" .
-            " █ ███ █  ██   █ ███ █ \n" .
-            " █ ███ █  ███  █ ███ █ \n" .
-            " █ ███ █   █ █ █ ███ █ \n" .
-            " █     █    ██ █     █ \n" .
-            " ███████ █ █ █ ███████ \n" .
-            "         █████         \n" .
-            " ██ ██ █  ██ █ █     █ \n" .
-            "    ██    ██ █ █ ██    \n" .
-            "  ████████ █  ██ █  ██ \n" .
-            "           ██      █ █ \n" .
-            "  ██  ███  █   █  █  █ \n" .
-            "         █ ███    █ █  \n" .
-            " ███████  ██ ██████    \n" .
-            " █     █   ████   ██   \n" .
-            " █ ███ █ ██ ██ ██ █ ██ \n" .
-            " █ ███ █ ██ ██  █ ██   \n" .
-            " █ ███ █   █   █ ██ ██ \n" .
-            " █     █ ███  ███ ████ \n" .
-            " ███████ ████   ██     \n" .
-            "                       \n" .
-            '
' - ; - - $qrCode = Encoder::encode( - $content, - new ErrorCorrectionLevel(ErrorCorrectionLevel::L), - Encoder::DEFAULT_BYTE_MODE_ECODING - ); - $this->assertEquals($expected, $this->renderer->render($qrCode)); - } - - public function testSetStyle() - { - $content = 'foobar'; - $qrCode = Encoder::encode( - $content, - new ErrorCorrectionLevel(ErrorCorrectionLevel::L), - Encoder::DEFAULT_BYTE_MODE_ECODING - ); - $this->renderer->setStyle('bar'); - $this->assertEquals('bar', $this->renderer->getStyle()); - $this->assertStringMatchesFormat('%astyle="bar"%a', $this->renderer->render($qrCode)); - } - - public function testSetClass() - { - $content = 'foobar'; - $qrCode = Encoder::encode( - $content, - new ErrorCorrectionLevel(ErrorCorrectionLevel::L), - Encoder::DEFAULT_BYTE_MODE_ECODING - ); - $this->renderer->setClass('bar'); - $this->assertEquals('bar', $this->renderer->getClass()); - $this->assertStringMatchesFormat('%aclass="bar"%a', $this->renderer->render($qrCode)); - } -} diff --git a/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Renderer/Text/TextTest.php b/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Renderer/Text/TextTest.php deleted file mode 100644 index d94e8e5d..00000000 --- a/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Renderer/Text/TextTest.php +++ /dev/null @@ -1,149 +0,0 @@ -renderer = new Plain(); - $this->writer = new Writer($this->renderer); - } - - public function testBasicRender() - { - $content = 'foobar'; - $expected = - " \n" . - " ███████ █████ ███████ \n" . - " █ █ █ █ █ █ \n" . - " █ ███ █ ██ █ ███ █ \n" . - " █ ███ █ ███ █ ███ █ \n" . - " █ ███ █ █ █ █ ███ █ \n" . - " █ █ ██ █ █ \n" . - " ███████ █ █ █ ███████ \n" . - " █████ \n" . - " ██ ██ █ ██ █ █ █ \n" . - " ██ ██ █ █ ██ \n" . - " ████████ █ ██ █ ██ \n" . - " ██ █ █ \n" . - " ██ ███ █ █ █ █ \n" . - " █ ███ █ █ \n" . - " ███████ ██ ██████ \n" . - " █ █ ████ ██ \n" . - " █ ███ █ ██ ██ ██ █ ██ \n" . - " █ ███ █ ██ ██ █ ██ \n" . - " █ ███ █ █ █ ██ ██ \n" . - " █ █ ███ ███ ████ \n" . - " ███████ ████ ██ \n" . - " \n" - ; - - $qrCode = Encoder::encode( - $content, - new ErrorCorrectionLevel(ErrorCorrectionLevel::L), - Encoder::DEFAULT_BYTE_MODE_ECODING - ); - $this->assertEquals($expected, $this->renderer->render($qrCode)); - } - - public function testBasicRenderNoMargins() - { - $content = 'foobar'; - $expected = - "███████ █████ ███████\n" . - "█ █ █ █ █ █\n" . - "█ ███ █ ██ █ ███ █\n" . - "█ ███ █ ███ █ ███ █\n" . - "█ ███ █ █ █ █ ███ █\n" . - "█ █ ██ █ █\n" . - "███████ █ █ █ ███████\n" . - " █████ \n" . - "██ ██ █ ██ █ █ █\n" . - " ██ ██ █ █ ██ \n" . - " ████████ █ ██ █ ██\n" . - " ██ █ █\n" . - " ██ ███ █ █ █ █\n" . - " █ ███ █ █ \n" . - "███████ ██ ██████ \n" . - "█ █ ████ ██ \n" . - "█ ███ █ ██ ██ ██ █ ██\n" . - "█ ███ █ ██ ██ █ ██ \n" . - "█ ███ █ █ █ ██ ██\n" . - "█ █ ███ ███ ████\n" . - "███████ ████ ██ \n" - ; - - $qrCode = Encoder::encode( - $content, - new ErrorCorrectionLevel(ErrorCorrectionLevel::L), - Encoder::DEFAULT_BYTE_MODE_ECODING - ); - $this->renderer->setMargin(0); - $this->assertEquals(0, $this->renderer->getMargin()); - $this->assertEquals($expected, $this->renderer->render($qrCode)); - } - - public function testBasicRenderCustomChar() - { - $content = 'foobar'; - $expected = - "-----------------------\n" . - "-#######-#####-#######-\n" . - "-#-----#--#-#--#-----#-\n" . - "-#-###-#--##---#-###-#-\n" . - "-#-###-#--###--#-###-#-\n" . - "-#-###-#---#-#-#-###-#-\n" . - "-#-----#----##-#-----#-\n" . - "-#######-#-#-#-#######-\n" . - "---------#####---------\n" . - "-##-##-#--##-#-#-----#-\n" . - "----##----##-#-#-##----\n" . - "--########-#--##-#--##-\n" . - "-----------##------#-#-\n" . - "--##--###--#---#--#--#-\n" . - "---------#-###----#-#--\n" . - "-#######--##-######----\n" . - "-#-----#---####---##---\n" . - "-#-###-#-##-##-##-#-##-\n" . - "-#-###-#-##-##--#-##---\n" . - "-#-###-#---#---#-##-##-\n" . - "-#-----#-###--###-####-\n" . - "-#######-####---##-----\n" . - "-----------------------\n" - ; - - $qrCode = Encoder::encode( - $content, - new ErrorCorrectionLevel(ErrorCorrectionLevel::L), - Encoder::DEFAULT_BYTE_MODE_ECODING - ); - $this->renderer->setFullBlock('#'); - $this->renderer->setEmptyBlock('-'); - $this->assertEquals('#', $this->renderer->getFullBlock()); - $this->assertEquals('-', $this->renderer->getEmptyBlock()); - $this->assertEquals($expected, $this->renderer->render($qrCode)); - } -} diff --git a/vendor/bacon/bacon-qr-code/tests/bootstrap.php b/vendor/bacon/bacon-qr-code/tests/bootstrap.php deleted file mode 100644 index 05a49415..00000000 --- a/vendor/bacon/bacon-qr-code/tests/bootstrap.php +++ /dev/null @@ -1,10 +0,0 @@ - - - - . - - - - ../src/ - - - diff --git a/vendor/robthree/twofactorauth/.gitignore b/vendor/robthree/twofactorauth/.gitignore deleted file mode 100644 index 1a31666a..00000000 --- a/vendor/robthree/twofactorauth/.gitignore +++ /dev/null @@ -1,186 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -# User-specific files -*.suo -*.user -*.sln.docstates - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -build/ -bld/ -[Bb]in/ -[Oo]bj/ - -# Roslyn cache directories -*.ide/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -#NUNIT -*.VisualState.xml -TestResult.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -*_i.c -*_p.c -*_i.h -*.ilk -*.meta -*.obj -*.pch -*.pdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opensdf -*.sdf -*.cachefile - -# Visual Studio profiler -*.psess -*.vsp -*.vspx - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding addin-in -.JustCode - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# NCrunch -_NCrunch_* -.*crunch*.local.xml - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# TODO: Comment the next line if you want to checkin your web deploy settings -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/packages/* -# except build/, which is used as an MSBuild target. -!**/packages/build/ -# If using the old MSBuild-Integrated Package Restore, uncomment this: -#!**/packages/repositories.config - -# Windows Azure Build Output -csx/ -*.build.csdef - -# Windows Store app package directory -AppPackages/ - -# Others -sql/ -*.Cache -ClientBin/ -[Ss]tyle[Cc]op.* -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.pfx -*.publishsettings -node_modules/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm - -# SQL Server files -*.mdf -*.ldf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings - -# Microsoft Fakes -FakesAssemblies/ - -# Composer -/vendor \ No newline at end of file diff --git a/vendor/robthree/twofactorauth/.travis.yml b/vendor/robthree/twofactorauth/.travis.yml deleted file mode 100644 index 034653bb..00000000 --- a/vendor/robthree/twofactorauth/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: php - -php: - - 5.3 - - 5.4 - - 5.5 - - 5.6 - - 7 - - hhvm - -script: phpunit --coverage-text tests diff --git a/vendor/robthree/twofactorauth/.vs/config/applicationhost.config b/vendor/robthree/twofactorauth/.vs/config/applicationhost.config deleted file mode 100644 index 4b9bf477..00000000 --- a/vendor/robthree/twofactorauth/.vs/config/applicationhost.config +++ /dev/null @@ -1,1031 +0,0 @@ - - - - - - - -
-
-
-
-
-
-
-
- - - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
- -
-
- -
-
-
- - -
-
-
-
-
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/robthree/twofactorauth/TwoFactorAuth.phpproj b/vendor/robthree/twofactorauth/TwoFactorAuth.phpproj deleted file mode 100644 index 7fa2a58e..00000000 --- a/vendor/robthree/twofactorauth/TwoFactorAuth.phpproj +++ /dev/null @@ -1,69 +0,0 @@ - - - - Debug - TwoFactorAuth - {e569f53a-a604-4579-91ce-4e35b27da47b} - TwoFactorAuth - Library - {A0786B88-2ADB-4C21-ABE8-AA2D79766269} - False - PHPDev - None - True - 41315 - localhost - http://localhost:41315/ - PHP - 7.0 - - - true - - - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vendor/robthree/twofactorauth/composer.json b/vendor/robthree/twofactorauth/composer.json deleted file mode 100644 index a4c13758..00000000 --- a/vendor/robthree/twofactorauth/composer.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "robthree/twofactorauth", - "description": "Two Factor Authentication", - "version": "1.6", - "type": "library", - "keywords": [ "Authentication", "Two Factor Authentication", "Multi Factor Authentication", "TFA", "MFA", "PHP", "Authenticator", "Authy" ], - "homepage": "https://github.com/RobThree/TwoFactorAuth", - "license": "MIT", - "authors": [ - { - "name": "Rob Janssen", - "homepage": "http://robiii.me", - "role": "Developer" - } - ], - "support": { - "issues": "https://github.com/RobThree/TwoFactorAuth/issues", - "source": "https://github.com/RobThree/TwoFactorAuth" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "@stable" - }, - "autoload": { - "psr-4": { - "RobThree\\Auth\\": "lib" - } - }, - "autoload-dev": { - "psr-4": { - "RobThree\\Auth\\Test\\": "tests" - } - } -} diff --git a/vendor/robthree/twofactorauth/composer.lock b/vendor/robthree/twofactorauth/composer.lock deleted file mode 100644 index 63df9377..00000000 --- a/vendor/robthree/twofactorauth/composer.lock +++ /dev/null @@ -1,980 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "content-hash": "9647de85f54ba6db237f5ff42ff85a1f", - "packages": [], - "packages-dev": [ - { - "name": "doctrine/instantiator", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", - "shasum": "" - }, - "require": { - "php": ">=5.3,<8.0-DEV" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "ext-pdo": "*", - "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2015-06-14T21:17:01+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "suggest": { - "dflydev/markdown": "~1.0", - "erusev/parsedown": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "phpDocumentor": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" - } - ], - "time": "2015-02-03T12:10:50+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.6.2", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "6c52c2722f8460122f96f86346600e1077ce22cb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/6c52c2722f8460122f96f86346600e1077ce22cb", - "reference": "6c52c2722f8460122f96f86346600e1077ce22cb", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", - "sebastian/comparator": "^1.1", - "sebastian/recursion-context": "^1.0|^2.0" - }, - "require-dev": { - "phpspec/phpspec": "^2.0", - "phpunit/phpunit": "^4.8 || ^5.6.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6.x-dev" - } - }, - "autoload": { - "psr-0": { - "Prophecy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "time": "2016-11-21T14:58:47+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "2.2.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "~1.3", - "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0" - }, - "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4" - }, - "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "time": "2015-10-06T15:47:00+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "1.4.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "time": "2016-10-03T07:40:28+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "time": "2015-06-21T13:50:34+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "1.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260", - "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4|~5" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2016-05-12T18:03:57+00:00" - }, - { - "name": "phpunit/php-token-stream", - "version": "1.4.9", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3b402f65a4cc90abf6e1104e388b896ce209631b", - "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2016-11-15T14:06:22+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "4.8.35", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "791b1a67c25af50e230f841ee7a9c6eba507dc87" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/791b1a67c25af50e230f841ee7a9c6eba507dc87", - "reference": "791b1a67c25af50e230f841ee7a9c6eba507dc87", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "~2.1", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "^1.0.6", - "phpunit/phpunit-mock-objects": "~2.3", - "sebastian/comparator": "~1.2.2", - "sebastian/diff": "~1.2", - "sebastian/environment": "~1.3", - "sebastian/exporter": "~1.2", - "sebastian/global-state": "~1.0", - "sebastian/version": "~1.0", - "symfony/yaml": "~2.1|~3.0" - }, - "suggest": { - "phpunit/php-invoker": "~1.1" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.8.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2017-02-06T05:18:07+00:00" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "2.3.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2", - "sebastian/exporter": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "time": "2015-10-02T06:51:40+00:00" - }, - { - "name": "sebastian/comparator", - "version": "1.2.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2 || ~2.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "time": "2017-01-29T09:50:25+00:00" - }, - { - "name": "sebastian/diff", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff" - ], - "time": "2015-12-08T07:14:41+00:00" - }, - { - "name": "sebastian/environment", - "version": "1.3.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8 || ^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "time": "2016-08-18T05:49:44+00:00" - }, - { - "name": "sebastian/exporter", - "version": "1.2.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "time": "2016-06-17T09:04:28+00:00" - }, - { - "name": "sebastian/global-state", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "time": "2015-10-12T03:26:01+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "913401df809e99e4f47b27cdd781f4a258d58791" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", - "reference": "913401df809e99e4f47b27cdd781f4a258d58791", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2015-11-11T19:50:13+00:00" - }, - { - "name": "sebastian/version", - "version": "1.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "shasum": "" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "time": "2015-06-21T13:59:46+00:00" - }, - { - "name": "symfony/yaml", - "version": "v2.8.17", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "322a8c2dfbca15ad6b1b27e182899f98ec0e0153" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/322a8c2dfbca15ad6b1b27e182899f98ec0e0153", - "reference": "322a8c2dfbca15ad6b1b27e182899f98ec0e0153", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com", - "time": "2017-01-21T16:40:50+00:00" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": { - "phpunit/phpunit": 0 - }, - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": ">=5.3.0" - }, - "platform-dev": [] -} diff --git a/vendor/robthree/twofactorauth/demo/demo.php b/vendor/robthree/twofactorauth/demo/demo.php deleted file mode 100644 index 996dd928..00000000 --- a/vendor/robthree/twofactorauth/demo/demo.php +++ /dev/null @@ -1,35 +0,0 @@ - - - - Demo - - -
    - First create a secret and associate it with a user'; - $secret = $tfa->createSecret(160); // Though the default is an 80 bits secret (for backwards compatibility reasons) we recommend creating 160+ bits secrets (see RFC 4226 - Algorithm Requirements) - echo '
  1. Next create a QR code and let the user scan it:

    ...or display the secret to the user for manual entry: ' . chunk_split($secret, 4, ' '); - $code = $tfa->getCode($secret); - echo '
  2. Next, have the user verify the code; at this time the code displayed by a 2FA-app would be: ' . $code . ' (but that changes periodically)'; - echo '
  3. When the code checks out, 2FA can be / is enabled; store (encrypted?) secret with user and have the user verify a code each time a new session is started.'; - echo '
  4. When aforementioned code (' . $code . ') was entered, the result would be: ' . (($tfa->verifyCode($secret, $code) === true) ? 'OK' : 'FAIL'); - ?> -
-

Note: Make sure your server-time is NTP-synced! Depending on the $discrepancy allowed your time cannot drift too much from the users' time!

- ensureCorrectTime(); - echo 'Your hosts time seems to be correct / within margin'; - } catch (RobThree\Auth\TwoFactorAuthException $ex) { - echo 'Warning: Your hosts time seems to be off: ' . $ex->getMessage(); - } - ?> - - diff --git a/vendor/robthree/twofactorauth/demo/loader.php b/vendor/robthree/twofactorauth/demo/loader.php deleted file mode 100644 index 208f24d4..00000000 --- a/vendor/robthree/twofactorauth/demo/loader.php +++ /dev/null @@ -1,50 +0,0 @@ -=0;$i--) { - static::$parentPath = dirname(static::$parentPath); - } - static::$paths = array(); - static::$files = array(__FILE__); - } - - public static function register($path,$namespace) { - if (!static::$initialized) static::initialize(); - static::$paths[$namespace] = trim($path,DIRECTORY_SEPARATOR); - } - - public static function load($class) { - if (class_exists($class,false)) return; - if (!static::$initialized) static::initialize(); - - foreach (static::$paths as $namespace => $path) { - if (!$namespace || $namespace.static::$nsChar === substr($class, 0, strlen($namespace.static::$nsChar))) { - - $fileName = substr($class,strlen($namespace.static::$nsChar)-1); - $fileName = str_replace(static::$nsChar, DIRECTORY_SEPARATOR, ltrim($fileName,static::$nsChar)); - $fileName = static::$parentPath.DIRECTORY_SEPARATOR.$path.DIRECTORY_SEPARATOR.$fileName.'.php'; - - if (file_exists($fileName)) { - include $fileName; - return true; - } - } - } - return false; - } -} - -spl_autoload_register(array('Loader', 'load')); \ No newline at end of file diff --git a/vendor/robthree/twofactorauth/logo.png b/vendor/robthree/twofactorauth/logo.png deleted file mode 100644 index 65af9b2e4bf1eff36bd9cdf7fbb0567593421ba4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2636 zcmV-S3bXZzP)=2C00000001Z^Bme*ahK7I%2?_P}^~A!$jg5x_0s;aE2Ib@9=H%o!J2&R# z<^eO;!oR+~)goAyEi-+9V+0xI?wX&}?J~|#!MS*{N zB34QT77?kZrxr~>8AUt8zP@m7YdmFJfq#5KNk--5guDQ zpsTBp2^B^=7E3=zMMd}a_a`SN zRbN~aM>`cvKNCnh6G=Q3NlaT#^z`)c@bMNFDO?+u7O9%gXTX@8I6v6;44DMLGBO_ZL}87gk3SLpTO2A@lO{-Q3#|K{f>~ zBIV@d*w)t8)6>w*%*@Hk2QMY|_4e-V?&IR&)6vn!!@~|dF&t@E6iYt}H7e53&kQ*( z($3Dz$jHOMz=wo|9A#7qF(>-^`oO%r3^ptVDImzj#UOEB1SlQ^CLF!GyRfgXtgEaa zZCe^%P6QztwzIUTr>D=(&7GQ=mXni!eSRQnSsGzc8#gbcp`@appN@=;gn)r%V`dps zN4mJTrn0Ykc6c0DN&+Pt#LCFR!^D)PqL7Y~ZjXmSbZ9knWmQyJ{QUfYmyutKfVsiH zwZ6QXuBmi>er;=UU20`PWLqUkKv95oGe|;No6ki600512QchC<0t6rm7!zv@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tfa->getCode('VMR466AB62ZBOKHE', 0)); - } - - /** - * @expectedException \RobThree\Auth\TwoFactorAuthException - */ - public function testCreateSecretThrowsOnInsecureRNGProvider() { - $rng = new TestRNGProvider(); - - $tfa = new TwoFactorAuth('Test', 6, 30, 'sha1', null, $rng); - $tfa->createSecret(); - } - - public function testCreateSecretOverrideSecureDoesNotThrowOnInsecureRNG() { - $rng = new TestRNGProvider(); - - $tfa = new TwoFactorAuth('Test', 6, 30, 'sha1', null, $rng); - $this->assertEquals('ABCDEFGHIJKLMNOP', $tfa->createSecret(80, false)); - } - - public function testCreateSecretDoesNotThrowOnSecureRNGProvider() { - $rng = new TestRNGProvider(true); - - $tfa = new TwoFactorAuth('Test', 6, 30, 'sha1', null, $rng); - $this->assertEquals('ABCDEFGHIJKLMNOP', $tfa->createSecret()); - } - - public function testCreateSecretGeneratesDesiredAmountOfEntropy() { - $rng = new TestRNGProvider(true); - - $tfa = new TwoFactorAuth('Test', 6, 30, 'sha1', null, $rng); - $this->assertEquals('A', $tfa->createSecret(5)); - $this->assertEquals('AB', $tfa->createSecret(6)); - $this->assertEquals('ABCDEFGHIJKLMNOPQRSTUVWXYZ', $tfa->createSecret(128)); - $this->assertEquals('ABCDEFGHIJKLMNOPQRSTUVWXYZ234567', $tfa->createSecret(160)); - $this->assertEquals('ABCDEFGHIJKLMNOPQRSTUVWXYZ234567ABCDEFGHIJKLMNOPQRSTUVWXYZ234567', $tfa->createSecret(320)); - $this->assertEquals('ABCDEFGHIJKLMNOPQRSTUVWXYZ234567ABCDEFGHIJKLMNOPQRSTUVWXYZ234567A', $tfa->createSecret(321)); - } - - public function testEnsureCorrectTimeDoesNotThrowForCorrectTime() { - $tpr1 = new TestTimeProvider(123); - $tpr2 = new TestTimeProvider(128); - - $tfa = new TwoFactorAuth('Test', 6, 30, 'sha1', null, null, $tpr1); - $tfa->ensureCorrectTime(array($tpr2)); // 128 - 123 = 5 => within default leniency - } - - /** - * @expectedException \RobThree\Auth\TwoFactorAuthException - */ - public function testEnsureCorrectTimeThrowsOnIncorrectTime() { - $tpr1 = new TestTimeProvider(123); - $tpr2 = new TestTimeProvider(124); - - $tfa = new TwoFactorAuth('Test', 6, 30, 'sha1', null, null, $tpr1); - $tfa->ensureCorrectTime(array($tpr2), 0); // We force a leniency of 0, 124-123 = 1 so this should throw - } - - - public function testEnsureDefaultTimeProviderReturnsCorrectTime() { - $tfa = new TwoFactorAuth('Test', 6, 30, 'sha1'); - $tfa->ensureCorrectTime(array(new TestTimeProvider(time())), 1); // Use a leniency of 1, should the time change between both time() calls - } - - public function testEnsureAllTimeProvidersReturnCorrectTime() { - $tfa = new TwoFactorAuth('Test', 6, 30, 'sha1'); - $tfa->ensureCorrectTime(array( - new RobThree\Auth\Providers\Time\ConvertUnixTimeDotComTimeProvider(), - new RobThree\Auth\Providers\Time\HttpTimeProvider(), // Uses google.com by default - new RobThree\Auth\Providers\Time\HttpTimeProvider('https://github.com'), - new RobThree\Auth\Providers\Time\HttpTimeProvider('https://yahoo.com'), - )); - } - - public function testVerifyCodeWorksCorrectly() { - - $tfa = new TwoFactorAuth('Test', 6, 30); - $this->assertEquals(true , $tfa->verifyCode('VMR466AB62ZBOKHE', '543160', 1, 1426847190)); - $this->assertEquals(true , $tfa->verifyCode('VMR466AB62ZBOKHE', '543160', 0, 1426847190 + 29)); //Test discrepancy - $this->assertEquals(false, $tfa->verifyCode('VMR466AB62ZBOKHE', '543160', 0, 1426847190 + 30)); //Test discrepancy - $this->assertEquals(false, $tfa->verifyCode('VMR466AB62ZBOKHE', '543160', 0, 1426847190 - 1)); //Test discrepancy - - $this->assertEquals(true , $tfa->verifyCode('VMR466AB62ZBOKHE', '543160', 1, 1426847205 + 0)); //Test discrepancy - $this->assertEquals(true , $tfa->verifyCode('VMR466AB62ZBOKHE', '543160', 1, 1426847205 + 35)); //Test discrepancy - $this->assertEquals(true , $tfa->verifyCode('VMR466AB62ZBOKHE', '543160', 1, 1426847205 - 35)); //Test discrepancy - - $this->assertEquals(false, $tfa->verifyCode('VMR466AB62ZBOKHE', '543160', 1, 1426847205 + 65)); //Test discrepancy - $this->assertEquals(false, $tfa->verifyCode('VMR466AB62ZBOKHE', '543160', 1, 1426847205 - 65)); //Test discrepancy - - $this->assertEquals(true , $tfa->verifyCode('VMR466AB62ZBOKHE', '543160', 2, 1426847205 + 65)); //Test discrepancy - $this->assertEquals(true , $tfa->verifyCode('VMR466AB62ZBOKHE', '543160', 2, 1426847205 - 65)); //Test discrepancy - } - - public function testTotpUriIsCorrect() { - $qr = new TestQrProvider(); - - $tfa = new TwoFactorAuth('Test&Issuer', 6, 30, 'sha1', $qr); - $data = $this->DecodeDataUri($tfa->getQRCodeImageAsDataUri('Test&Label', 'VMR466AB62ZBOKHE')); - $this->assertEquals('test/test', $data['mimetype']); - $this->assertEquals('base64', $data['encoding']); - $this->assertEquals('otpauth://totp/Test%26Label?secret=VMR466AB62ZBOKHE&issuer=Test%26Issuer&period=30&algorithm=SHA1&digits=6@200', $data['data']); - } - - /** - * @expectedException \RobThree\Auth\TwoFactorAuthException - */ - public function testGetQRCodeImageAsDataUriThrowsOnInvalidSize() { - $qr = new TestQrProvider(); - - $tfa = new TwoFactorAuth('Test', 6, 30, 'sha1', $qr); - $tfa->getQRCodeImageAsDataUri('Test', 'VMR466AB62ZBOKHE', 0); - } - - /** - * @expectedException \RobThree\Auth\TwoFactorAuthException - */ - public function testGetCodeThrowsOnInvalidBase32String1() { - $tfa = new TwoFactorAuth('Test'); - $tfa->getCode('FOO1BAR8BAZ9'); //1, 8 & 9 are invalid chars - } - - /** - * @expectedException \RobThree\Auth\TwoFactorAuthException - */ - public function testGetCodeThrowsOnInvalidBase32String2() { - $tfa = new TwoFactorAuth('Test'); - $tfa->getCode('mzxw6==='); //Lowercase - } - - public function testKnownBase32DecodeTestVectors() { - // We usually don't test internals (e.g. privates) but since we rely heavily on base32 decoding and don't want - // to expose this method nor do we want to give people the possibility of implementing / providing their own base32 - // decoding/decoder (as we do with Rng/QR providers for example) we simply test the private base32Decode() method - // with some known testvectors **only** to ensure base32 decoding works correctly following RFC's so there won't - // be any bugs hiding in there. We **could** 'fool' ourselves by calling the public getCode() method (which uses - // base32decode internally) and then make sure getCode's output (in digits) equals expected output since that would - // mean the base32Decode() works as expected but that **could** hide some subtle bug(s) in decoding the base32 string. - - // "In general, you don't want to break any encapsulation for the sake of testing (or as Mom used to say, "don't - // expose your privates!"). Most of the time, you should be able to test a class by exercising its public methods." - // Dave Thomas and Andy Hunt -- "Pragmatic Unit Testing - $tfa = new TwoFactorAuth('Test'); - - $method = new ReflectionMethod('RobThree\Auth\TwoFactorAuth', 'base32Decode'); - $method->setAccessible(true); - - // Test vectors from: https://tools.ietf.org/html/rfc4648#page-12 - $this->assertEquals('', $method->invoke($tfa, '')); - $this->assertEquals('f', $method->invoke($tfa, 'MY======')); - $this->assertEquals('fo', $method->invoke($tfa, 'MZXQ====')); - $this->assertEquals('foo', $method->invoke($tfa, 'MZXW6===')); - $this->assertEquals('foob', $method->invoke($tfa, 'MZXW6YQ=')); - $this->assertEquals('fooba', $method->invoke($tfa, 'MZXW6YTB')); - $this->assertEquals('foobar', $method->invoke($tfa, 'MZXW6YTBOI======')); - } - - public function testKnownBase32DecodeUnpaddedTestVectors() { - // See testKnownBase32DecodeTestVectors() for the rationale behind testing the private base32Decode() method. - // This test ensures that strings without the padding-char ('=') are also decoded correctly. - // https://tools.ietf.org/html/rfc4648#page-4: - // "In some circumstances, the use of padding ("=") in base-encoded data is not required or used." - $tfa = new TwoFactorAuth('Test'); - - $method = new ReflectionMethod('RobThree\Auth\TwoFactorAuth', 'base32Decode'); - $method->setAccessible(true); - - // Test vectors from: https://tools.ietf.org/html/rfc4648#page-12 - $this->assertEquals('', $method->invoke($tfa, '')); - $this->assertEquals('f', $method->invoke($tfa, 'MY')); - $this->assertEquals('fo', $method->invoke($tfa, 'MZXQ')); - $this->assertEquals('foo', $method->invoke($tfa, 'MZXW6')); - $this->assertEquals('foob', $method->invoke($tfa, 'MZXW6YQ')); - $this->assertEquals('fooba', $method->invoke($tfa, 'MZXW6YTB')); - $this->assertEquals('foobar', $method->invoke($tfa, 'MZXW6YTBOI')); - } - - - public function testKnownTestVectors_sha1() { - //Known test vectors for SHA1: https://tools.ietf.org/html/rfc6238#page-15 - $secret = 'GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ'; //== base32encode('12345678901234567890') - $tfa = new TwoFactorAuth('Test', 8, 30, 'sha1'); - $this->assertEquals('94287082', $tfa->getCode($secret, 59)); - $this->assertEquals('07081804', $tfa->getCode($secret, 1111111109)); - $this->assertEquals('14050471', $tfa->getCode($secret, 1111111111)); - $this->assertEquals('89005924', $tfa->getCode($secret, 1234567890)); - $this->assertEquals('69279037', $tfa->getCode($secret, 2000000000)); - $this->assertEquals('65353130', $tfa->getCode($secret, 20000000000)); - } - - public function testKnownTestVectors_sha256() { - //Known test vectors for SHA256: https://tools.ietf.org/html/rfc6238#page-15 - $secret = 'GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQGEZA'; //== base32encode('12345678901234567890123456789012') - $tfa = new TwoFactorAuth('Test', 8, 30, 'sha256'); - $this->assertEquals('46119246', $tfa->getCode($secret, 59)); - $this->assertEquals('68084774', $tfa->getCode($secret, 1111111109)); - $this->assertEquals('67062674', $tfa->getCode($secret, 1111111111)); - $this->assertEquals('91819424', $tfa->getCode($secret, 1234567890)); - $this->assertEquals('90698825', $tfa->getCode($secret, 2000000000)); - $this->assertEquals('77737706', $tfa->getCode($secret, 20000000000)); - } - - public function testKnownTestVectors_sha512() { - //Known test vectors for SHA512: https://tools.ietf.org/html/rfc6238#page-15 - $secret = 'GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQGEZDGNA'; //== base32encode('1234567890123456789012345678901234567890123456789012345678901234') - $tfa = new TwoFactorAuth('Test', 8, 30, 'sha512'); - $this->assertEquals('90693936', $tfa->getCode($secret, 59)); - $this->assertEquals('25091201', $tfa->getCode($secret, 1111111109)); - $this->assertEquals('99943326', $tfa->getCode($secret, 1111111111)); - $this->assertEquals('93441116', $tfa->getCode($secret, 1234567890)); - $this->assertEquals('38618901', $tfa->getCode($secret, 2000000000)); - $this->assertEquals('47863826', $tfa->getCode($secret, 20000000000)); - } - - /** - * @requires function random_bytes - */ - public function testCSRNGProvidersReturnExpectedNumberOfBytes() { - $rng = new \RobThree\Auth\Providers\Rng\CSRNGProvider(); - foreach ($this->getRngTestLengths() as $l) - $this->assertEquals($l, strlen($rng->getRandomBytes($l))); - $this->assertEquals(true, $rng->isCryptographicallySecure()); - } - - /** - * @requires function hash_algos - * @requires function hash - */ - public function testHashRNGProvidersReturnExpectedNumberOfBytes() { - $rng = new \RobThree\Auth\Providers\Rng\HashRNGProvider(); - foreach ($this->getRngTestLengths() as $l) - $this->assertEquals($l, strlen($rng->getRandomBytes($l))); - $this->assertEquals(false, $rng->isCryptographicallySecure()); - } - - /** - * @requires function mcrypt_create_iv - */ - public function testMCryptRNGProvidersReturnExpectedNumberOfBytes() { - $rng = new \RobThree\Auth\Providers\Rng\MCryptRNGProvider(); - foreach ($this->getRngTestLengths() as $l) - $this->assertEquals($l, strlen($rng->getRandomBytes($l))); - $this->assertEquals(true, $rng->isCryptographicallySecure()); - } - - /** - * @requires function openssl_random_pseudo_bytes - */ - public function testStrongOpenSSLRNGProvidersReturnExpectedNumberOfBytes() { - $rng = new \RobThree\Auth\Providers\Rng\OpenSSLRNGProvider(true); - foreach ($this->getRngTestLengths() as $l) - $this->assertEquals($l, strlen($rng->getRandomBytes($l))); - $this->assertEquals(true, $rng->isCryptographicallySecure()); - } - - /** - * @requires function openssl_random_pseudo_bytes - */ - public function testNonStrongOpenSSLRNGProvidersReturnExpectedNumberOfBytes() { - $rng = new \RobThree\Auth\Providers\Rng\OpenSSLRNGProvider(false); - foreach ($this->getRngTestLengths() as $l) - $this->assertEquals($l, strlen($rng->getRandomBytes($l))); - $this->assertEquals(false, $rng->isCryptographicallySecure()); - } - - - private function getRngTestLengths() { - return array(1, 16, 32, 256); - } - - private function DecodeDataUri($datauri) { - if (preg_match('/data:(?P[\w\.\-\/]+);(?P\w+),(?P.*)/', $datauri, $m) === 1) { - return array( - 'mimetype' => $m['mimetype'], - 'encoding' => $m['encoding'], - 'data' => base64_decode($m['data']) - ); - } - return null; - } -} - -class TestRNGProvider implements IRNGProvider { - private $isSecure; - - function __construct($isSecure = false) { - $this->isSecure = $isSecure; - } - - public function getRandomBytes($bytecount) { - $result = ''; - for ($i=0; $i<$bytecount; $i++) - $result.=chr($i); - return $result; - - } - - public function isCryptographicallySecure() { - return $this->isSecure; - } -} - -class TestQrProvider implements IQRCodeProvider { - public function getQRCodeImage($qrtext, $size) { - return $qrtext . '@' . $size; - } - - public function getMimeType() { - return 'test/test'; - } -} - -class TestTimeProvider implements ITimeProvider { - private $time; - - function __construct($time) { - $this->time = $time; - } - - public function getTime() { - return $this->time; - } -} \ No newline at end of file diff --git a/vendor/zendframework/zendxml/.gitignore b/vendor/zendframework/zendxml/.gitignore deleted file mode 100644 index 0a4f6e27..00000000 --- a/vendor/zendframework/zendxml/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -composer.lock -vendor -.buildpath -.project -.settings diff --git a/vendor/zendframework/zendxml/.travis.yml b/vendor/zendframework/zendxml/.travis.yml deleted file mode 100644 index 877b0650..00000000 --- a/vendor/zendframework/zendxml/.travis.yml +++ /dev/null @@ -1,43 +0,0 @@ -sudo: false - -language: php - -branches: - except: - - /^release-.*$/ - - /^ghgfk-.*$/ - -cache: - directories: - - $HOME/.composer/cache - -matrix: - allow_failures: - - php: hhvm -matrix: - fast_finish: true - include: - - php: 5.3 - - php: 5.4 - - php: 5.5 - env: - - EXECUTE_CS_CHECK=true - - php: 5.6 - - php: 7 - - php: hhvm - allow_failures: - - php: hhvm - -before_install: - - composer self-update - -install: - - travis_retry composer install --no-interaction --ignore-platform-reqs - -script: - - ./vendor/bin/phpunit -c ./tests - - if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/phpcs --standard=PSR2 --ignore=tests/Bootstrap.php library tests ; fi - -notifications: - irc: "irc.freenode.org#zftalk.dev" - email: false diff --git a/vendor/zendframework/zendxml/composer.json b/vendor/zendframework/zendxml/composer.json deleted file mode 100644 index d9efb222..00000000 --- a/vendor/zendframework/zendxml/composer.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "zendframework/zendxml", - "description": "Utility library for XML usage, best practices, and security in PHP", - "type": "library", - "license": "BSD-3-Clause", - "keywords": [ - "zf2", - "xml", - "security" - ], - "homepage": "http://packages.zendframework.com/", - "autoload": { - "psr-0": { - "ZendXml\\": "library/" - } - }, - "autoload-dev": { - "psr-4": { - "ZendTest\\Xml\\": "tests/ZendXmlTest/" - } - }, - "repositories": [ - { - "type": "composer", - "url": "http://packages.zendframework.com/" - } - ], - "require": { - "php": "^5.3.3 || ^7.0" - }, - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "require-dev": { - "phpunit/phpunit": "^3.7 || ^4.0", - "squizlabs/php_codesniffer": "^1.5" - } -} diff --git a/vendor/zendframework/zendxml/tests/Bootstrap.php b/vendor/zendframework/zendxml/tests/Bootstrap.php deleted file mode 100644 index a9d0e6a5..00000000 --- a/vendor/zendframework/zendxml/tests/Bootstrap.php +++ /dev/null @@ -1,92 +0,0 @@ -addDirectoryToWhitelist($zfCoreLibrary . '/' . $lastArg); - } elseif (is_file($zfCoreTests . '/' . $lastArg)) { - $codeCoverageFilter->addDirectoryToWhitelist(dirname($zfCoreLibrary . '/' . $lastArg)); - } else { - $codeCoverageFilter->addDirectoryToWhitelist($zfCoreLibrary); - } - - /* - * Omit from code coverage reports the contents of the tests directory - */ - $codeCoverageFilter->addDirectoryToBlacklist($zfCoreTests, ''); - $codeCoverageFilter->addDirectoryToBlacklist(PEAR_INSTALL_DIR, ''); - $codeCoverageFilter->addDirectoryToBlacklist(PHP_LIBDIR, ''); - - unset($codeCoverageFilter); -} - -/* - * Unset global variables that are no longer needed. - */ -unset($phpUnitVersion); diff --git a/vendor/zendframework/zendxml/tests/ZendXmlTest/MultibyteTest.php b/vendor/zendframework/zendxml/tests/ZendXmlTest/MultibyteTest.php deleted file mode 100644 index 165e8fa5..00000000 --- a/vendor/zendframework/zendxml/tests/ZendXmlTest/MultibyteTest.php +++ /dev/null @@ -1,125 +0,0 @@ - array('UTF-16LE', pack('CC', 0xff, 0xfe), 3), - 'UTF-16BE' => array('UTF-16BE', pack('CC', 0xfe, 0xff), 3), - 'UTF-32LE' => array('UTF-32LE', pack('CCCC', 0xff, 0xfe, 0x00, 0x00), 4), - 'UTF-32BE' => array('UTF-32BE', pack('CCCC', 0x00, 0x00, 0xfe, 0xff), 4), - ); - } - - public function getXmlWithXXE() - { - return << - -]> - - retrieved: &pocdata; - -XML; - } - - /** - * Invoke ZendXml\Security::heuristicScan with the provided XML. - * - * @param string $xml - * @return void - * @throws Exception\RuntimeException - */ - public function invokeHeuristicScan($xml) - { - $r = new ReflectionMethod('ZendXml\Security', 'heuristicScan'); - $r->setAccessible(true); - return $r->invoke(null, $xml); - } - - /** - * @dataProvider multibyteEncodings - * @group heuristicDetection - */ - public function testDetectsMultibyteXXEVectorsUnderFPMWithEncodedStringMissingBOM($encoding, $bom, $bomLength) - { - $xml = $this->getXmlWithXXE(); - $xml = str_replace('{ENCODING}', $encoding, $xml); - $xml = iconv('UTF-8', $encoding, $xml); - $this->assertNotSame(0, strncmp($xml, $bom, $bomLength)); - $this->setExpectedException('ZendXml\Exception\RuntimeException', 'ENTITY'); - $this->invokeHeuristicScan($xml); - } - - /** - * @dataProvider multibyteEncodings - */ - public function testDetectsMultibyteXXEVectorsUnderFPMWithEncodedStringUsingBOM($encoding, $bom) - { - $xml = $this->getXmlWithXXE(); - $xml = str_replace('{ENCODING}', $encoding, $xml); - $orig = iconv('UTF-8', $encoding, $xml); - $xml = $bom . $orig; - $this->setExpectedException('ZendXml\Exception\RuntimeException', 'ENTITY'); - $this->invokeHeuristicScan($xml); - } - - public function getXmlWithoutXXE() - { - return << - - retrieved: &pocdata; - -XML; - } - - /** - * @dataProvider multibyteEncodings - */ - public function testDoesNotFlagValidMultibyteXmlAsInvalidUnderFPM($encoding) - { - $xml = $this->getXmlWithoutXXE(); - $xml = str_replace('{ENCODING}', $encoding, $xml); - $xml = iconv('UTF-8', $encoding, $xml); - try { - $result = $this->invokeHeuristicScan($xml); - $this->assertNull($result); - } catch (\Exception $e) { - $this->fail('Security scan raised exception when it should not have'); - } - } - - /** - * @dataProvider multibyteEncodings - * @group mixedEncoding - */ - public function testDetectsXXEWhenXMLDocumentEncodingDiffersFromFileEncoding($encoding, $bom) - { - $xml = $this->getXmlWithXXE(); - $xml = str_replace('{ENCODING}', 'UTF-8', $xml); - $xml = iconv('UTF-8', $encoding, $xml); - $xml = $bom . $xml; - $this->setExpectedException('ZendXml\Exception\RuntimeException', 'ENTITY'); - $this->invokeHeuristicScan($xml); - } -} diff --git a/vendor/zendframework/zendxml/tests/ZendXmlTest/SecurityTest.php b/vendor/zendframework/zendxml/tests/ZendXmlTest/SecurityTest.php deleted file mode 100644 index fa3b30bf..00000000 --- a/vendor/zendframework/zendxml/tests/ZendXmlTest/SecurityTest.php +++ /dev/null @@ -1,135 +0,0 @@ - -]> - - This result is &harmless; - -XML; - - $this->setExpectedException('ZendXml\Exception\RuntimeException'); - $result = XmlSecurity::scan($xml); - } - - public function testScanForXXE() - { - $file = tempnam(sys_get_temp_dir(), 'ZendXml_Security'); - file_put_contents($file, 'This is a remote content!'); - $xml = << - -]> - - &foo; - -XML; - - try { - $result = XmlSecurity::scan($xml); - } catch (Exception\RuntimeException $e) { - unlink($file); - return; - } - $this->fail('An expected exception has not been raised.'); - } - - public function testScanSimpleXmlResult() - { - $result = XmlSecurity::scan($this->getXml()); - $this->assertTrue($result instanceof SimpleXMLElement); - $this->assertEquals($result->result, 'test'); - } - - public function testScanDom() - { - $dom = new DOMDocument('1.0'); - $result = XmlSecurity::scan($this->getXml(), $dom); - $this->assertTrue($result instanceof DOMDocument); - $node = $result->getElementsByTagName('result')->item(0); - $this->assertEquals($node->nodeValue, 'test'); - } - - public function testScanInvalidXml() - { - $xml = <<test -XML; - - $result = XmlSecurity::scan($xml); - $this->assertFalse($result); - } - - public function testScanInvalidXmlDom() - { - $xml = <<test -XML; - - $dom = new DOMDocument('1.0'); - $result = XmlSecurity::scan($xml, $dom); - $this->assertFalse($result); - } - - public function testScanFile() - { - $file = tempnam(sys_get_temp_dir(), 'ZendXml_Security'); - file_put_contents($file, $this->getXml()); - - $result = XmlSecurity::scanFile($file); - $this->assertTrue($result instanceof SimpleXMLElement); - $this->assertEquals($result->result, 'test'); - unlink($file); - } - - public function testScanXmlWithDTD() - { - $xml = << - - -]> - - test - -XML; - - $dom = new DOMDocument('1.0'); - $result = XmlSecurity::scan($xml, $dom); - $this->assertTrue($result instanceof DOMDocument); - $this->assertTrue($result->validate()); - } - - protected function getXml() - { - return << - - test - -XML; - } -} diff --git a/vendor/zendframework/zendxml/tests/phpunit.xml.dist b/vendor/zendframework/zendxml/tests/phpunit.xml.dist deleted file mode 100755 index 069784bd..00000000 --- a/vendor/zendframework/zendxml/tests/phpunit.xml.dist +++ /dev/null @@ -1,27 +0,0 @@ - - - - ./ZendXmlTest - ./ZendXmlTest/TestAsset - - - - - - - - - - - - - - ./ZendXmlTest - ../vendor - - - - - - -