Skip to content

test: fix determinism of CacheTest - #9967

Merged
paulbalandan merged 1 commit into
codeigniter4:developfrom
paulbalandan:deterministic-cached-router-test
Feb 20, 2026
Merged

test: fix determinism of CacheTest#9967
paulbalandan merged 1 commit into
codeigniter4:developfrom
paulbalandan:deterministic-cached-router-test

Conversation

@paulbalandan

Copy link
Copy Markdown
Member

Description
When running vendor/bin/phpunit --filter Response, CodeIgniter\Router\Attributes\CacheTest::testAfterCachesGetRequestResponse will fail because the previous test (testBeforeReturnsCachedResponseWhenFound()) pollutes the cache entries and response object. This can also be validated by running vendor/bin/phpunit --filter CacheTest --order-by=random.

To test, both mentioned should pass.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide
@paulbalandan paulbalandan added the testing Pull requests that changes tests only label Feb 20, 2026
@paulbalandan
paulbalandan force-pushed the deterministic-cached-router-test branch from 5611b58 to da494da Compare February 20, 2026 12:45
@paulbalandan
paulbalandan merged commit c127bff into codeigniter4:develop Feb 20, 2026
47 checks passed
@paulbalandan
paulbalandan deleted the deterministic-cached-router-test branch February 20, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Pull requests that changes tests only

2 participants