Commit graph

10 commits

Author SHA1 Message Date
Timo Tijhof
9849db9c79 skins: Move default style modules to getDefaultModules
This advances T140664 as well, because it encourages module
loading logic from the skin to be in this single method.

Update the tests for setupSkinUserCss(), to now target
getDefaultModules() instead, given setupSkinUserCss() no longer
provides these behaviours. Had to move where the mock object
was created so that it can be injected in the skin (previously
it could be passed as parameter). Besides, its generally best-
practice to create mocks and stubs within the test anyhow, not in
the data provider.

Bug: T140664
Depends-On: Ib2b19ba165a9d646a770702cdf1724509156b93e
Change-Id: I3404c1c2a7e8eae0b803b31f333cb9b837f43d4a
2018-05-04 23:52:02 +00:00
Timo Tijhof
4da760c56a Skin: Remove the cache-compat remainings of mediawiki.sectionAnchor
Follows-up 5205405385. Two 2 years seems long enough :)

Bug: T18691
Change-Id: Id2f17312cbfe3ee9dda68bf8f9bcf94e18b003c6
2018-05-03 23:34:35 +00:00
Umherirrender
67d420b302 Move @group and @covers tags in tests close to class
For @group and @covers tags there should be no newline between the
comment and the class

Change-Id: I7277df13a332cf4d74ffdd8748e3fbdc259610dc
2018-01-28 13:30:07 +01:00
Umherirrender
45da581551 Use ::class to resolve class names in tests
This helps to find renamed or misspelled classes earlier.
Phan will check the class names

Change-Id: Ie541a7baae10ab6f5c13f95ac2ff6598b8f8950c
2018-01-26 22:49:13 +01:00
Timo Tijhof
8fbd1cd1e1 phpunit: Fix OutputPage::__construct warning in SkinTemplateTest
https://integration.wikimedia.org/ci/job/mediawiki-core-code-coverage/2562/console
> Deprecated: Use of OutputPage::__construct was deprecated in MediaWiki 1.18.
> .. SkinTemplateTest->getMockOutputPage() ..

Change-Id: I7f44ffecc40b9d972839554361660e5b38ce3aef
2017-02-08 18:19:43 +00:00
addshore
3968dc9379 Add tests for SkinTemplate::setupSkinUserCss
Change-Id: I2033a98c3934a6e246b91338fd13472c4def0ddb
2017-01-20 14:10:52 +00:00
Chad Horohoe
b664350b0b SkinTemplateTest typofix
There's no "t" in "make"

Change-Id: I41dc25162262bddec94f3af35db86a246ccd7499
2016-08-11 13:54:05 -07:00
Bartosz Dziewoński
667522795b Fix trivial PHPCS violations in */skins/* directories
Due to T127238, files in various */skins/* directories are not checked
by PHPCS. Temporarily removed the exclude rule from phpcs.xml and ran:

  composer fix includes/skins/* tests/phpunit/includes/skins/* tests/phpunit/skins/*

Change-Id: I9240c1cee825920b6634903282be6252cce55686
2016-03-02 21:02:15 +01:00
Timo Tijhof
b4bac102b6 tests: Clean up file headers
* Remove redundant @licence/@license from test suite files.
  They already have full licence headers. And @licence raises a
  warning in Doxygen.

* Fix weird messes of comments inside comments and other things.

Change-Id: I38da8ca76330f72b8dc22b0ecf1ea69d5ea55ede
2015-04-01 00:17:12 +01:00
Kunal Mehta
eb37e9d1ff Introduce SkinFactory
Modeled similar to ConfigFactory, this lets skins
register themselves via a callback, allowing for
proper dependency injection.

Loading via $wgValidSkinNames is still supported,
but considered "legacy", not deprecated though.

Skin::newFromKey is now deprecated (and had only
one caller in an extension, which I'll update
afterwards).

Change-Id: I1960483f87c2ef55c994545239b728fa376f17f4
2014-08-09 21:40:54 +01:00
Renamed from tests/phpunit/includes/SkinTemplateTest.php (Browse further)