mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 09:48:40 +00:00
48 lines
1.2 KiB
PHP
Executable File
48 lines
1.2 KiB
PHP
Executable File
<?php
|
|
/**
|
|
* Jingga
|
|
*
|
|
* 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\Application;
|
|
|
|
require_once __DIR__ . '/../Autoloader.php';
|
|
|
|
use phpOMS\Application\InstallerAbstract;
|
|
|
|
/**
|
|
* @internal
|
|
*/
|
|
#[\PHPUnit\Framework\Attributes\CoversClass(\phpOMS\Application\InstallerAbstract::class)]
|
|
#[\PHPUnit\Framework\Attributes\TestDox('phpOMS\tests\Application\InstallerAbstractTest: Abstract application installer')]
|
|
final class InstallerAbstractTest extends \PHPUnit\Framework\TestCase
|
|
{
|
|
protected InstallerAbstract $installer;
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
protected function setUp() : void
|
|
{
|
|
$this->installer = new class() extends InstallerAbstract {
|
|
public const PATH = __DIR__ . '/Invalid';
|
|
};
|
|
}
|
|
|
|
#[\PHPUnit\Framework\Attributes\Group('framework')]
|
|
#[\PHPUnit\Framework\Attributes\TestDox('An invalid theme cannot be installed')]
|
|
public function testInvalidTheme() : void
|
|
{
|
|
$this->installer::installTheme(__DIR__, 'Invalid');
|
|
self::assertFalse(\is_dir(__DIR__ . '/css'));
|
|
}
|
|
}
|