mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-05-02 14:36:08 -04:00
add new Jdenticon comment icon library, set it as default, fixes #793
This commit is contained in:
parent
78aa70e3ab
commit
8ac69590cf
50 changed files with 6996 additions and 401 deletions
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
use Identicon\Identicon;
|
||||
use Jdenticon\Identicon;
|
||||
use PrivateBin\Configuration;
|
||||
use PrivateBin\Data\Database;
|
||||
use PrivateBin\Model;
|
||||
|
@ -314,8 +314,15 @@ class ModelTest extends PHPUnit_Framework_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');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue