Merge branch 'master' into php8

This commit is contained in:
El RIDO 2022-10-29 19:38:01 +02:00
commit c44b252aa8
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
52 changed files with 7024 additions and 729 deletions

View file

@ -1,6 +1,6 @@
<?php
use Identicon\Identicon;
use Jdenticon\Identicon;
use PHPUnit\Framework\TestCase;
use PrivateBin\Configuration;
use PrivateBin\Data\Database;
@ -307,8 +307,15 @@ class ModelTest extends TestCase
$comment->get();
$comment->store();
$identicon = new Identicon();
$pngdata = $identicon->getImageDataUri(TrafficLimiter::getHash(), 16);
$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');
}