From 7b444bf62bb773fc7decfca39b1426e11d73ffb0 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sat, 5 Jul 2025 19:40:37 +0200 Subject: [PATCH] update test to use a Jdenticon --- tst/ModelTest.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tst/ModelTest.php b/tst/ModelTest.php index 301856bc..61488196 100644 --- a/tst/ModelTest.php +++ b/tst/ModelTest.php @@ -1,6 +1,6 @@ get(); $comment->store(); - $identicon = new Identicon(); - $pngdata = $identicon->getImageDataUri(TrafficLimiter::getHash(), 16); - $comment = current($this->_model->getPaste(Helper::getPasteId())->get()['comments']); + $identicon = new Identicon(array( + 'hash' => TrafficLimiter::getHash(), + 'size' => 16, + 'style' => array( + 'backgroundColor' => '#fff0', // fully transparent, for dark mode + 'padding' => 0, + ), + )); + $pngdata = $identicon->getImageDataUri('png'); + $comment = current($this->_model->getPaste(Helper::getPasteId())->get()['comments']); $this->assertEquals($pngdata, $comment['meta']['icon'], 'icon gets set'); }