Skip to content

Commit

Permalink
Try to fix QR code testing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianallgeier committed Sep 12, 2024
1 parent e10ba93 commit c740c1a
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions tests/Image/QrCodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,20 @@ public function testWrite()
$this->assertFileExists($file);
$this->assertFileEquals(static::FIXTURES . '/test.png', $file);

$qr->write($file = static::TMP . '/test.gif');
$this->assertFileExists($file);
$this->assertFileEquals(static::FIXTURES . '/test.gif', $file);

$qr->write($file = static::TMP . '/test.webp');
$this->assertFileExists($file);
$this->assertFileEquals(static::FIXTURES . '/test.webp', $file);

// test GIF by comparing the output dynamically to avoid issues
// with different libraries/library versions in CI
$fixture = static::FIXTURES . '/test.gif';
$expectedGif = $this->imageContent(imagecreatefromgif($fixture));

$qr->write($file = static::TMP . '/test.gif');
$this->assertFileExists($file);
$actualGif = $this->imageContent(imagecreatefromgif($file));
$this->assertSame($expectedGif, $actualGif);

Check failure on line 157 in tests/Image/QrCodeTest.php

View workflow job for this annotation

GitHub Actions / Release: CI - Backend / Unit tests - PHP 8.1

Failed asserting that two strings are identical.

Check failure on line 157 in tests/Image/QrCodeTest.php

View workflow job for this annotation

GitHub Actions / Release: CI - Backend / Unit tests - PHP 8.2

Failed asserting that two strings are identical.

Check failure on line 157 in tests/Image/QrCodeTest.php

View workflow job for this annotation

GitHub Actions / Release: CI - Backend / Unit tests - PHP 8.3

Failed asserting that two strings are identical.

// test JPEG by comparing the output dynamically to avoid issues
// with different libraries/library versions in CI
$fixture = static::FIXTURES . '/test.jpg';
Expand Down

0 comments on commit c740c1a

Please sign in to comment.