iqual / icms-test-suite
ICMS product test suite - PHPUnit/DTT tests asserting the ICMS contract in every client project.
Requires
- php: >=8.3
- drupal/core-dev: ^11
- drupal/graphql: ^4
- weitzman/drupal-test-traits: ^2.1
This package is auto-updated.
Last update: 2026-08-27 13:55:23 UTC
README
PHPUnit tests asserting the ICMS product contract — the GraphQL interface the Nuxt frontend
depends on, the caching contract, blökkli paragraphs, language handling, search, the editorial
backend and the installed bundles. The suite ships with every ICMS release (via
iqual/icms_core_dev) and runs in every client project's CI, catching regressions from routine
updates and from project customizations before deployment.
The tests run through Drupal Test Traits
against the existing site and are discovered by the phpunit.xml.dist scaffolded by
iqual/drupal-nuxt-platform (vendor/iqual/*-test-suite/tests/src/*).
make drupal-test-db # everything make drupal-test-db PHPUNIT_FLAGS="--group=icms" # core contract only make drupal-test-db PHPUNIT_FLAGS="--group=icms_bundle_news" # one bundle
Skipping tests in a customized project
The suite asserts the contract as shipped. Where a project deliberately deviates, document the
deviation in settings.local.php instead of patching the suite — the reason is printed with the
skip:
$settings['icms_test_suite']['skip'] = [ 'groups' => ['icms_search' => 'Search is served by Algolia (PROJ-12).'], 'tests' => [ 'Iqual\IcmsTestSuite\Tests\ExistingSite\NuxtCacheHeadersTest' => 'No Varnish in front of this site.', 'Iqual\IcmsTestSuite\Tests\ExistingSite\GraphQlSmokeTest::testEntityCanBeQueried' => 'PROJ-56', ], ];
Bundle tests (#[Group('icms_bundle_<name>')]) skip themselves wherever the bundle's _logic
module is not enabled.
Writing project-level tests
Project tests belong in the project's drupal/tests/src/<TestType>/ (namespace
Tests\<TestType>), not in this package. They may extend the suite's base classes to reuse the
helpers:
Iqual\IcmsTestSuite\ExistingSite\IcmsExistingSiteBase— DTT base with site discovery (languages, blökkli hosts, editor roles, search indexes), content creation with clean-up and the GraphQL HTTP helpers (graphqlQuery()posts to/{lang}/graphqlwith theaccess_graphql.tokenheader, like Nuxt does).Iqual\IcmsTestSuite\ExistingSite\IcmsGraphQlExistingSiteBase— adds in-process execution against the GraphQL server with cache metadata assertions.
Development happens in the ICMS monorepo
(drupal/packages/icms-test-suite/, see docs/testing.md there); this repository is a
read-only distribution mirror.