No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

QrReaderTest.php 468B

123456789101112131415161718192021222324
  1. <?php
  2. namespace Khanamiryan\QrCodeTests;
  3. use PHPUnit\Framework\TestCase;
  4. use Zxing\QrReader;
  5. class QrReaderTest extends TestCase
  6. {
  7. public function testText1()
  8. {
  9. $image = __DIR__ . "/qrcodes/hello_world.png";
  10. $qrcode = new QrReader($image);
  11. $this->assertSame("Hello world!", $qrcode->text());
  12. }
  13. public function testNoText()
  14. {
  15. $image = __DIR__ . "/qrcodes/empty.png";
  16. $qrcode = new QrReader($image);
  17. $this->assertSame(false, $qrcode->text());
  18. }
  19. }