Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"magento-hackathon/magento-composer-installer": "^3.1 || ^2.1 || ^4.0",
"mklkj/tinymce-i18n": "^25.2",
"nnnick/chartjs": "^4.4",
"openmage/composer-plugin": "^3.0",
"openmage/composer-plugin": "^3.1",
"pelago/emogrifier": "^8.0",
"phpseclib/mcrypt_compat": "^2.0.3",
"phpseclib/phpseclib": "^3.0.14",
Expand Down
24 changes: 16 additions & 8 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 54 additions & 0 deletions tests/unit/Base/TinyMCELicenseTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?php

/**
* @copyright For copyright and license information, read the COPYING.txt file.
* @link /COPYING.txt
* @license Open Software License (OSL 3.0)
* @package OpenMage_Tests
*/

declare(strict_types=1);

namespace unit\Base;

use Composer\InstalledVersions;
use PHPUnit\Framework\TestCase;

final class TinyMCELicenseTest extends TestCase
{
public const TINY_MCE_NAMESPACE = 'tinymce/tinymce';

public const ERROR_MESSAGE = "License file doesn't exist.";

public const SKIP_MESSAGE = 'TinyMCE is not installed.';

/**
* @group Base
* @group TinyMCE
*/
public function testRootLicenseFilesExists(): void
{
if (InstalledVersions::isInstalled(self::TINY_MCE_NAMESPACE)) {
$rootDir = dirname(__DIR__, 3);
$filename = $rootDir . DIRECTORY_SEPARATOR . 'LICENSE_TINYMCE.txt';
self::assertFileExists($filename, self::ERROR_MESSAGE);
} else {
self::markTestSkipped(self::SKIP_MESSAGE);
}
}

/**
* @group Base
* @group TinyMCE
*/
public function testVendorLicenseFilesExists(): void
{
if (InstalledVersions::isInstalled(self::TINY_MCE_NAMESPACE)) {
$vendorPath = InstalledVersions::getInstallPath(self::TINY_MCE_NAMESPACE);
$filename = $vendorPath . DIRECTORY_SEPARATOR . 'LICENSE_TINYMCE_OPENMAGE.txt';
self::assertFileExists($filename, self::ERROR_MESSAGE);
} else {
self::markTestSkipped(self::SKIP_MESSAGE);
}
}
}
Loading