From dfc522ccbb1817e4e44114d09771cf4abc347652 Mon Sep 17 00:00:00 2001 From: Julien Boulen Date: Sun, 12 Oct 2025 21:55:21 +0200 Subject: [PATCH] MDL-86320 core: Fix unit test qrcode_test --- lib/tests/qrcode_test.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/tests/qrcode_test.php b/lib/tests/qrcode_test.php index faf14e44614..8450026a362 100644 --- a/lib/tests/qrcode_test.php +++ b/lib/tests/qrcode_test.php @@ -26,8 +26,8 @@ use core_qrcode; * @author * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +#[\PHPUnit\Framework\Attributes\CoversClass(core_qrcode::class)] final class qrcode_test extends \basic_testcase { - /** * Basic test to generate a QR code and check that the library is not broken. */ @@ -36,9 +36,9 @@ final class qrcode_test extends \basic_testcase { // binary file can be different. This is why tests are limited. $text = 'abc'; - $color = 'black'; - $qrcode = new core_qrcode($text, $color); - $svgdata = $qrcode->getBarcodeSVGcode(1, 1); + $color = 'green'; + $qrcode = new core_qrcode($text); + $svgdata = $qrcode->getBarcodeSVGcode(1, 1, $color); // Just check the SVG was generated. $this->assertStringContainsString('' . $text . '', $svgdata);