extended script to test jdenticon ImageMagick and documented option to work without GD
This commit is contained in:
parent
c0758e7bbb
commit
b2ef205411
|
@ -26,7 +26,7 @@ install and configure PrivateBin on your server. It's available on
|
||||||
- `open_basedir` access to `/dev/urandom`
|
- `open_basedir` access to `/dev/urandom`
|
||||||
- mcrypt extension AND `open_basedir` access to `/dev/urandom`
|
- mcrypt extension AND `open_basedir` access to `/dev/urandom`
|
||||||
- com_dotnet extension
|
- com_dotnet extension
|
||||||
- GD extension
|
- GD extension (when using identicon or vizhash icons, jdenticon works without it)
|
||||||
- zlib extension
|
- zlib extension
|
||||||
- some disk space or a database supported by [PDO](https://php.net/manual/book.pdo.php)
|
- some disk space or a database supported by [PDO](https://php.net/manual/book.pdo.php)
|
||||||
- ability to create files and folders in the installation directory and the PATH
|
- ability to create files and folders in the installation directory and the PATH
|
||||||
|
|
14
tst/IconTest
14
tst/IconTest
|
@ -28,7 +28,8 @@ $jdenticon = new Jdenticon(array(
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
$jdenticonGenerators = array(
|
$jdenticonGenerators = array(
|
||||||
'jdenticon PNG' => 'png',
|
'jdenticon' => 'png',
|
||||||
|
'jdenticon ImageMagick' => 'png',
|
||||||
'jdenticon SVG' => 'svg',
|
'jdenticon SVG' => 'svg',
|
||||||
);
|
);
|
||||||
$results = array(
|
$results = array(
|
||||||
|
@ -48,7 +49,11 @@ $results = array(
|
||||||
'lengths' => array(),
|
'lengths' => array(),
|
||||||
'time' => 0
|
'time' => 0
|
||||||
),
|
),
|
||||||
'jdenticon PNG' => array(
|
'jdenticon' => array(
|
||||||
|
'lengths' => array(),
|
||||||
|
'time' => 0
|
||||||
|
),
|
||||||
|
'jdenticon ImageMagick' => array(
|
||||||
'lengths' => array(),
|
'lengths' => array(),
|
||||||
'time' => 0
|
'time' => 0
|
||||||
),
|
),
|
||||||
|
@ -89,6 +94,11 @@ foreach ($identiconGenerators as $key => $identicon) {
|
||||||
|
|
||||||
foreach ($jdenticonGenerators as $key => $format) {
|
foreach ($jdenticonGenerators as $key => $format) {
|
||||||
echo 'run ', $key,' tests', PHP_EOL;
|
echo 'run ', $key,' tests', PHP_EOL;
|
||||||
|
if ($key === 'jdenticon ImageMagick') {
|
||||||
|
$jdenticon->enableImageMagick = true;
|
||||||
|
} else {
|
||||||
|
$jdenticon->enableImageMagick = false;
|
||||||
|
}
|
||||||
$start = microtime(true);
|
$start = microtime(true);
|
||||||
foreach ($hmacs as $i => $hmac) {
|
foreach ($hmacs as $i => $hmac) {
|
||||||
$jdenticon->setHash($hmac);
|
$jdenticon->setHash($hmac);
|
||||||
|
|
Loading…
Reference in New Issue