Advertisement
stronk7

Untitled

Jan 22nd, 2020
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. Proposal to add the 3rd bad use of namespaces in tests, because people feels the level-2 "test" is a good choice:
  2.  
  3. namespace mymodule; // Violates the level1 rules - invalid component name
  4. namespace mod_breakfast\myutilities; // Violates the level2 rules - invalid core API name
  5. namespace mod_forum\test; // While technically correct ("test" is a valid API) - it's not allowed
  6. // because namespaces in tests should point to the namespaces being
  7. // covered by the test, and normally components don't have any "test"
  8. // level-2 to be covered. Only then it can be used.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement