Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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.

53 changes: 53 additions & 0 deletions tests/unit/Base/TinyMCELicenseTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?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)) {
$filename = '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)) {
// @todo find a better way to get vendor dir
$filename = 'vendor/tinymce/tinymce/LICENSE_TINYMCE_OPENMAGE.txt';
self::assertFileExists($filename, self::ERROR_MESSAGE);
} else {
self::markTestSkipped(self::SKIP_MESSAGE);
}
}
}
Loading