Commit 3f4da20
fix: set global \$user stub so censor_text() does not fatal in unit tests
phpBB's real censor_text() calls smiley_text() which reads global \$user
and calls optionget(). In unit test context global \$user is null, causing
a fatal error in all fill_template-based event contract tests. Point the
global at the existing make_user_stub() mock before each fill_template call.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 69c043e commit 3f4da20
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
321 | 325 | | |
322 | 326 | | |
323 | 327 | | |
| |||
641 | 645 | | |
642 | 646 | | |
643 | 647 | | |
| 648 | + | |
644 | 649 | | |
645 | 650 | | |
646 | 651 | | |
| |||
768 | 773 | | |
769 | 774 | | |
770 | 775 | | |
| 776 | + | |
771 | 777 | | |
772 | 778 | | |
773 | 779 | | |
| |||
0 commit comments