mirror of
https://github.com/roundcube/roundcubemail.git
synced 2026-03-09 09:36:50 +01:00
* fix Tests\Browser\TestCase imports * fix remaining imports * fix PHPUnit\Framework\TestCase imports * import GuzzleHttp\Client * fix remaining * "php_unit_method_casing" is not todo * fix "single_line_comment_spacing" * fix 2nd commit done using older fixer
29 lines
653 B
PHP
29 lines
653 B
PHP
<?php
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class Identicon_IdenticonEngine extends 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());
|
|
}
|
|
}
|