Skip to content

chore(tests) #20 Add missing tests - #27

Merged
njoubert-cleverage merged 2 commits into
mainfrom
20
Sep 30, 2026
Merged

njoubert-cleverage merged 2 commits into
mainfrom
20

Conversation

@njoubert-cleverage

@njoubert-cleverage njoubert-cleverage commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Description

Fixes #20.

Completes the tests added with #22, #23 (PR #24) and #25 (PR #26), which covered the fixed behaviours:

  • GetTaskTest: stored null value, key from the process context, empty array input, input overriding adapter, unknown adapter (MissingAdapterException), options validated at initialization (missing required option, undefined option, invalid type)
  • SetTaskTest: no output, existing item overwritten, null value stored, key from the process context, unknown adapter, options validated at initialization
  • AbstractCacheTaskTest (new): a custom task extending AbstractCacheTask gets its own options from the input, validated by its options resolver (as documented in index.md)
  • AdapterTest (new): code, and every PSR-6 method forwarded to the decorated pool
  • CleverAgeCacheProcessExtensionTest (new): registry service, both tasks registered as non-shared services with the registry as argument and a public alias on their class (used as @<class> in process configurations)
  • CleverAgeCacheProcessBundleTest (new): getPath() is the bundle root, build() registers RegisterAdaptersPass

Coverage: 56/56 lines (44 tests).

The empty key case (placeholder key: '' not overridden by the input) is not tested: the key validation belongs to the adapter, and ArrayAdapter only validates keys with assert(), so no exception is thrown with zend.assertions=-1 (production php.ini, as used by the CI).

Requirements

  • Documentation updates
    • Reference
    • Changelog
  • Unit tests

Breaking changes

None (tests only).

🤖 Generated with Claude Code

njoubert-cleverage and others added 2 commits September 30, 2026 17:52
…ustom cache tasks, Adapter, bundle and DI extension

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ends on the adapter (assertions only for ArrayAdapter)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@njoubert-cleverage
njoubert-cleverage merged commit e88cf4f into main Sep 30, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add missing tests

1 participant