-
Notifications
You must be signed in to change notification settings - Fork 326
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite Kohana::message tests for fragility and coverage
These tests were vulnerable to breakage if modules provide their own validation message files, so were being skipped. Fixed to use (hopefully) collision-proof message files with known values and to cover a broader range of cases including missing file and missing key. Would ideally be further refactored to mock/have complete control of the module search path outside global state.
- Loading branch information
Showing
3 changed files
with
59 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
tests/test_data/message_tests/bottom_module/messages/kohana_core_message_tests.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?php | ||
// See the Kohana_CoreTest tests for Kohana::message | ||
return array( | ||
'bottom_only' => 'inherited bottom message', | ||
'cfs_replaced' => 'inherited cfs_replaced message', | ||
); |
6 changes: 6 additions & 0 deletions
6
tests/test_data/message_tests/top_module/messages/kohana_core_message_tests.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?php | ||
// See the Kohana_CoreTest tests for Kohana::message | ||
return array( | ||
'top_only' => 'top only message', | ||
'cfs_replaced' => 'overriding cfs_replaced message', | ||
); |