Commit graph

10 commits

Author SHA1 Message Date
Max Semenik
fb06e4cd85 Update tests to use PHPUnit 6 class names
Bug: T192167
Change-Id: I42b0c8908b4968b95b08f861a40af18dc79fa0a1
2019-10-06 01:01:28 -07:00
Clara Andrew-Wani
320ec708e4 Force usage of MCR aware database schema
Bug: T214308
Change-Id: I2ae4e82a12f730617563eb6f911fc406b9195391
2019-09-27 11:31:23 +00:00
Timo Tijhof
a52e796473 Revision: Inject Logger instead of LoggerSpi
For consistency with other services and entry points.
The caller decides on the channel name. This also narrows the
surface area for the DI layer by only requiring LoggerInterface
which is significantly lighter and easier to mock than an entire
LoggerProvider/Spi.

Change-Id: Ia71f2e1c0a1a08c9edf0736eb627c5d4a2dde8d5
2019-09-10 03:24:18 +01:00
Amir Sarabadani
d23af35764 Unset all globals unneeded for unit tests, assert correct directory
* Unset globals to avoid tests that look like unit tests but actually rely on
  globals
* move some tests out of unit directory so that the test suite will pass.
* Assert that tests which extend MediaWikiUnitTestCase are in a directory with
  "/unit/" in its path name

Depends-On: I67b37b1bde94eaa3d4298d9bd98ac57995ce93b9
Depends-On: I90921679518ee95fe393f8b1bbd9134daf0ba032
Bug: T87781
Change-Id: I16691fc8ac063705ba0c2bc63b96c4534ca8660b
2019-07-09 14:09:29 -04:00
Amir Sarabadani
095f5583cb Move trivial unit tests, round II
Change-Id: I18e5a1514d7372b34f7fb460adf506a1ac65001f
2019-07-02 19:52:29 +02:00
Aaron Schulz
ca00e47f53 revision: rename various $wikiId fields/parameters to $dbDomain
These fields are passed to methods like LoadBalancer::getConnection() and are
already expected to be DB domains. Update various comments as well.

Fix a few minor IDEA warnings.

Change-Id: I7cf76700690aec449872a80d30b5ba540d2bf315
2019-06-28 21:30:25 +00:00
Thiemo Kreuz
005dd91276 Replace very trivial mock builders with createMock()
It does the exact same before and after. createMock() always disables
the default constructor.

Change-Id: I7b294cc3ee7f245f0aec55d12f1277fca5d39bce
2019-06-24 08:36:16 +00:00
Umherirrender
209a8778a0 Add missing @covers to revision related tests
Change-Id: Id95369208e988c16d626ca6f986898e3e84e8565
2019-02-01 21:15:03 +00:00
daniel
db987c700a [MCR] Introduce SlotRoleHandler and SlotRoleRegistry
These new classes provide a mechanism for defining the
behavior of slots, like the content models it supports.
This acts as an extension point for extensions that need
to define custom slots, like the MediaInfo extension
for the SDC project.

Bug: T194046
Change-Id: Ia20c98eee819293199e541be75b5521f6413bc2f
2018-11-30 12:29:05 -08:00
Brad Jorsch
dff469a408 Re-namespace RevisionStore and RevisionRecord classes
During development a lot of classes were placed in MediaWiki\Storage\.
The precedent set would mean that every class relating to something
stored in a database table, plus all related value classes and such,
would go into that namespace.

Let's put them into MediaWiki\Revision\ instead. Then future classes
related to the 'page' table can go into MediaWiki\Page\, future classes
related to the 'user' table can go into MediaWiki\User\, and so on.

Note I didn't move DerivedPageDataUpdater, PageUpdateException,
PageUpdater, or RevisionSlotsUpdate in this patch. If these are kept
long-term, they probably belong in MediaWiki\Page\ or MediaWiki\Edit\
instead.

Bug: T204158
Change-Id: I16bea8927566a3c73c07e4f4afb3537e05aa04a5
2018-10-09 10:22:48 -04:00
Renamed from tests/phpunit/includes/Storage/RevisionStoreFactoryTest.php (Browse further)