<?php
/**
 * Orange Management
 *
 * PHP Version 7.4
 *
 * @package   tests
 * @copyright Dennis Eichhorn
 * @license   OMS License 1.0
 * @version   1.0.0
 * @link      https://orange-management.org
 */
declare(strict_types=1);

namespace phpOMS\tests\Utils;

require_once __DIR__ . '/../Autoloader.php';

use phpOMS\Utils\ImageUtils;

/**
 * @testdox phpOMS\tests\Utils\ImageUtilsTest: Image utilities
 *
 * @internal
 */
class ImageUtilsTest extends \PHPUnit\Framework\TestCase
{
    /**
     * @testdox Base64 image data can be decoded to an image
     * @covers phpOMS\Utils\ImageUtils
     * @group framework
     */
    public function testImage() : void
    {
        self::assertEquals(
            \file_get_contents(__DIR__ . '/logo.png'),
            ImageUtils::decodeBase64Image(
                'data:image/png;base64,[encoded data, 120280 characters]'
            )
        );
    }
}
