Fixes SemanticDataStorageDBIntegrationTest#6076
Conversation
Fixes testcase
WalkthroughThe changes involve refactoring the test setup in the integration test file by consolidating page creation into a single helper method, Changes
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (6)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
tests/phpunit/Integration/SemanticDataStorageDBIntegrationTest.php (1)
292-299: Improved test robustness with existence assertions.The extra assertions to verify page existence before running tests is an excellent practice. This helps to catch setup issues early and make test failures more obvious, rather than having confusing failures that stem from setup problems.
One minor suggestion: Consider adding more descriptive error messages that might include the page titles to help with debugging.
-$this->assertTrue($redirect->getTitle()->exists(), 'Redirect page should exist'); -$this->assertTrue($target->getTitle()->exists(), 'Target page should exist'); +$this->assertTrue($redirect->getTitle()->exists(), 'Redirect page "' . $redirect->getTitle() . '" should exist'); +$this->assertTrue($target->getTitle()->exists(), 'Target page "' . $target->getTitle() . '" should exist');
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
tests/phpunit/Integration/SemanticDataStorageDBIntegrationTest.php(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (6)
- GitHub Check: build (1.43, 8.2, mysql, mariadb:11.2, false, true)
- GitHub Check: build (1.42, 8.2, mysql, mariadb:11.2, false, true)
- GitHub Check: build (1.41, 8.1, mysql, mariadb:11.2, true, false)
- GitHub Check: build (1.40, 8.1, mysql, mariadb:11.2, false, false)
- GitHub Check: build (1.39, 8.1, mysql, mysql:8, false, false)
- GitHub Check: build (1.39, 8.1, mysql, mariadb:11.2, false, false)
🔇 Additional comments (2)
tests/phpunit/Integration/SemanticDataStorageDBIntegrationTest.php (2)
275-277: Good refactoring to extract test page creation!This refactoring nicely separates the test page creation from the actual test logic, making the test method more focused on what it's testing rather than the setup details.
314-333: Well-structured helper method with clear documentation.The new
createTestPages()method is well-implemented with:
- Good documentation explaining its purpose
- Clear return type documentation
- Thoughtful comments about page lifecycle management
- Clean organization of the page creation logic
This refactoring makes the test code more maintainable and easier to understand.
|
@paladox can you verify? Seems like the |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6076 +/- ##
=========================================
Coverage 56.92% 56.92%
Complexity 18942 18942
=========================================
Files 942 942
Lines 66899 66899
=========================================
Hits 38079 38079
Misses 28820 28820 ☔ View full report in Codecov by Sentry. |
Tests are passing? But I'm not an expert in tests. You could try and make a bogus test and see if it fails? |
|
Merge conflicts need resolving. |
Summary by CodeRabbit