Summary
All five tests in tests/functional/recenttopics_test.php assert only $crawler->filter('html')->count() >= 1 — which passes as long as the page does not return a 500 error. These are smoke tests with no signal value.
Current state
| Test |
Current assertion |
Problem |
test_rt_page |
html element exists |
Passes even if RT block is empty or broken |
test_rt_simple_page |
html element exists |
Same |
test_rt_page_disabled |
html element exists |
Doesn't verify the block is actually hidden |
test_index_has_recent_topics |
html element exists |
Creates a topic but never checks it appears |
test_ucp_preferences |
html element exists |
Doesn't verify any RT-specific form fields |
What the assertions should check
test_rt_page / test_rt_simple_page — RT block is present in the response; at minimum a known CSS class or language string rendered by the RT template
test_rt_page_disabled — the RT block is absent or a "disabled" state is shown
test_index_has_recent_topics — the created topic title appears inside the RT block on the index page
test_ucp_preferences — the UCP form contains the RT-specific fields (forum_recent_topics checkbox or equivalent)
Why this matters
The functional test suite currently gives false confidence. A broken template, a wrong config key, or a missing language string would all pass. Meaningful assertions make the suite worth running.
Summary
All five tests in
tests/functional/recenttopics_test.phpassert only$crawler->filter('html')->count() >= 1— which passes as long as the page does not return a 500 error. These are smoke tests with no signal value.Current state
test_rt_pagetest_rt_simple_pagetest_rt_page_disabledtest_index_has_recent_topicstest_ucp_preferencesWhat the assertions should check
test_rt_page/test_rt_simple_page— RT block is present in the response; at minimum a known CSS class or language string rendered by the RT templatetest_rt_page_disabled— the RT block is absent or a "disabled" state is showntest_index_has_recent_topics— the created topic title appears inside the RT block on the index pagetest_ucp_preferences— the UCP form contains the RT-specific fields (forum_recent_topicscheckbox or equivalent)Why this matters
The functional test suite currently gives false confidence. A broken template, a wrong config key, or a missing language string would all pass. Meaningful assertions make the suite worth running.