phpOMS/tests/Image/SkewTest.php
2023-04-16 01:55:36 +02:00

48 lines
995 B
PHP
Executable File

<?php
/**
* Karaka
*
* PHP Version 8.1
*
* @package tests
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
namespace phpOMS\tests\Image;
require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Image\Skew;
/**
* @testdox phpOMS\tests\Image\SkewTest: Image skew
* @internal
*/
final class SkewTest extends \PHPUnit\Framework\TestCase
{
/**
* @testdox A image can be automatically unskewed
* @group framework
* @covers phpOMS\Image\Skew
*/
public function testSkew() : void
{
/* Disabled because of very slow performance (244 seconds) */
self::markTestSkipped();
Skew::autoRotate(
__DIR__ . '/binary_tilted.png',
__DIR__ . '/test_binary_untilted.png',
10,
[150, 75],
[1700, 900]
);
self::assertTrue(\is_file(__DIR__ . '/test_binary_untilted.png'));
}
}