Commit graph

5 commits

Author SHA1 Message Date
Derick Alangi
c296685f4f tests: Avoid trying to access the DB in data providers
NOTE: some test cases where removed as they're exactly doing the
same thing as the ones above.

Bug: T291268
Change-Id: I8fa8bafc892dbc84f2aab2549d453d6f39835d33
2021-09-20 10:32:45 +01:00
Derick Alangi
7d12da5595 tests: Extract pure unit tests from TitleTest integration test
-> Fixed TODOs such as adding test cases for namespaces that are
   not in `$wgNamespacesWithSubpages` in `testGetSubpageText()`.

-> Re-arranged provider methods to come before the test case as
   already in the files for consistency.

Change-Id: Ice2b3a07ea2ddd20417cbe87da93065e1812619e
2021-09-08 17:59:59 +01:00
Derick A
7ebf05256a tests: Cover more methods in the Title::class (increase code coverage)
The methods that have been covered in this patch are listed below:
~ Title::hasFragment()
~ Title::getFragment()
~ Title::setFragment()
~ Title::isMainPage()
~ Title::equals()
~ Title::getPrefixedURL()
~ Title::prefix()
~ Title::__toString()
~ Title::getFullText()

Bug: T241406
Change-Id: I51ffadb52e7eef822e9e619e5132513dc1501f9b
2021-09-07 13:58:38 +00:00
DannyS712
7b556a5761 Move some Title tests to unit tests
Tests for the following methods don't need integration:
- legalChars()
- convertByteClassToUnicodeClass()
- newFromTitleValue()
- newFromLinkTarget()
- castFromLinkTarget()

Change-Id: I2ec6505088c74a90da9d0b8305ce94d81cc0562a
2021-07-09 23:18:57 +00:00
DannyS712
bf2ed4cb22 Add Unit tests for Title class
Expand test coverage for some simple uncovered methods

Bug: T241406
Change-Id: I678aebac50bec908f90f861c3e59a89f63e7f917
2021-01-21 03:51:20 +00:00