mirror of
https://github.com/roundcube/roundcubemail.git
synced 2026-03-12 02:56:50 +01:00
* Fix "method_argument_space" * Fix "control_structure_continuation_position" * Fix "new_with_parentheses" * Fix "blank_line_before_statement" * Fix "visibility_required" * Fix some "array_indentation" * Fix some "array_indentation" - unify all "rcube::raise_error" calls * rm useless eslint ignores and add rules counts * sort eslint ignores * fix eslint ignores grammar * Revert "Fix "blank_line_before_statement"" * fix CS 3.46.0
27 lines
638 B
PHP
27 lines
638 B
PHP
<?php
|
|
|
|
class Identicon_IdenticonEngine extends PHPUnit\Framework\TestCase
|
|
{
|
|
public static function setUpBeforeClass(): void
|
|
{
|
|
include_once __DIR__ . '/../identicon_engine.php';
|
|
}
|
|
|
|
/**
|
|
* Test icon generation
|
|
*/
|
|
public function test_icon_generation()
|
|
{
|
|
if (!function_exists('imagepng')) {
|
|
$this->markTestSkipped();
|
|
}
|
|
|
|
$engine = new identicon_engine('test@domain.com', 10);
|
|
|
|
$icon = $engine->getBinary();
|
|
|
|
$this->assertMatchesRegularExpression('/^\x89\x50\x4E\x47/', $icon);
|
|
$this->assertSame('image/png', $engine->getMimetype());
|
|
}
|
|
}
|