Skip to content

test(phpunit): force array cache and Discord off in tests (#47) - #48

Merged
tomahock merged 1 commit into
mainfrom
test/force-phpunit-env
Oct 26, 2026
Merged

tomahock merged 1 commit into
mainfrom
test/force-phpunit-env

Conversation

@tomahock

Copy link
Copy Markdown
Member

Closes #47

Problem

phpunit.xml set CACHE_STORE=array without force, and did not touch DISCORD_ENABLE. Laravel's env() reads $_SERVER first, so a real environment variable (e.g. inside a container) wins:

Change

Force CACHE_STORE=array and DISCORD_ENABLE=false via both <env force="true"> and <server force="true"> (<env force> alone only sets $_ENV/putenv, not $_SERVER).

Tests

Ran with -e CACHE_STORE=redis -e REDIS_HOST=127.0.0.2 -e DISCORD_ENABLE=true:

  • before: AnepcFeedHealthTest 5/5 errors (tries to use Redis);
  • after: 5/5 pass; a probe test sees DISCORD_ENABLE=false, cache.default=array.

Deploy

Nothing to deploy (test config only).

🤖 Generated with Claude Code

Laravel reads $_SERVER before $_ENV, so a real CACHE_STORE or
DISCORD_ENABLE environment variable (e.g. in a container) beat the
phpunit.xml values: tests posted to Discord and AnepcFeedHealthTest
would flush a real cache store. Force both via <env> and <server>.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T15:07:58.113027Z 654d85a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@tomahock
tomahock merged commit 3b6732c into main Oct 26, 2026
1 check 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.

Tests can hit real Discord and flush a real Redis

1 participant