mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-12-15 16:29:38 -05:00
Merge pull request #1008 from PrivateBin/jdenticons-test
Jdenticons size and speed test results
This commit is contained in:
commit
b53df70227
7 changed files with 72 additions and 29 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
use Jdenticon\Identicon;
|
||||
use Identicon\Identicon;
|
||||
use PrivateBin\Configuration;
|
||||
use PrivateBin\Data\Database;
|
||||
use PrivateBin\Model;
|
||||
|
|
@ -314,15 +314,8 @@ class ModelTest extends PHPUnit_Framework_TestCase
|
|||
$comment->get();
|
||||
$comment->store();
|
||||
|
||||
$identicon = new Identicon(array(
|
||||
'hash' => TrafficLimiter::getHash(),
|
||||
'size' => 16,
|
||||
'style' => array(
|
||||
'backgroundColor' => '#fff0', // fully transparent, for dark mode
|
||||
'padding' => 0,
|
||||
),
|
||||
));
|
||||
$pngdata = $identicon->getImageDataUri('png');
|
||||
$identicon = new Identicon();
|
||||
$pngdata = $identicon->getImageDataUri(TrafficLimiter::getHash(), 16);
|
||||
$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