Files
roundcubemail/plugins/identicon/tests/IdenticonEngineTest.php
Michael Voříšek 1e360999b2 Use composer autoloader for bundled plugins testing (#9412)
* use fixed "roundcube/plugin-installer"

* Use composer autoloader for plugins testing

* cherrypick remaining from 9241 related with testing

* minor legacy autoload improvements
2024-04-11 18:28:46 +02:00

24 lines
529 B
PHP

<?php
use PHPUnit\Framework\TestCase;
class Identicon_IdenticonEngine extends TestCase
{
/**
* 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());
}
}