VersionTest.php

Same filename and directory in other branches
  1. 11.x core/modules/ckeditor5/tests/src/Unit/VersionTest.php
  2. 10 core/modules/ckeditor5/tests/src/Unit/VersionTest.php
  3. 10 core/modules/system/tests/src/Functional/Module/VersionTest.php
  4. 9 core/modules/system/tests/src/Functional/Module/VersionTest.php
  5. 8.9.x core/modules/system/tests/src/Functional/Module/VersionTest.php

Namespace

Drupal\Tests\ckeditor5\Unit

File

core/modules/ckeditor5/tests/src/Unit/VersionTest.php

View source
<?php

declare (strict_types=1);
namespace Drupal\Tests\ckeditor5\Unit;

use Drupal\Tests\UnitTestCase;
use PHPUnit\Framework\Attributes\Group;

/**
 * Test the CKEditor version.
 *
 * @internal
 */
class VersionTest extends UnitTestCase {
  
  /**
   * Ensure that CKEditor5 versions are aligned.
   */
  public function testVersionAlignment() : void {
    $package_json = json_decode(file_get_contents(__DIR__ . '/../../../../../package.json'), TRUE);
    $ckeditor_dependencies = array_filter($package_json['devDependencies'], fn($key) => str_starts_with($key, '@ckeditor/ckeditor5-'), ARRAY_FILTER_USE_KEY);
    $this->assertCount(1, array_unique($ckeditor_dependencies));
  }

}

Classes

Title Deprecated Summary
VersionTest Test the CKEditor version.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.