Commit graph

17 commits

Author SHA1 Message Date
Fomafix 363abd4afb Use overrideConfigValue instead of setMwGlobals
Change-Id: Id53db757cf0c2f0601cc34a9403edf3bbb1f7298
2024-07-24 16:22:59 +00:00
Moritz Schubotz (physikerwelt) 9236575a1a Remove explicit DB access
* Uses BagOfStuff caching instead of custom-made DB cache
* By configuring the BagOfStuff cache in a way that
  it writes to the database no performance implications are expected
* For WMF-use this should have no effect since restbase
  is used to cache stuff
* Replaces Ib2c216f54e6817ee2c3be0355ba72bd4769ba6ea

Bug: T349442
Change-Id: I1ce8ad9cf4c1a9ae71f447e4e067b39ee2601640
2024-01-11 15:57:02 +00:00
Thiemo Kreuz 7dbc300a5f Various code cleanups, more compact syntax and such
Some notes:
* Note that array_column() strips array keys. I checked and this is
  fine here.
* Html::element() will skip attributes that are set to null or false.
  Perfect fit here.
* I routinely remove comments that do notjing but repeat what the
  code already says.

Change-Id: Ie7797b78f1af5d8404c9e97b333fac8c6b3ac85e
2022-11-23 15:36:22 +01:00
Alexander Vorwerk ee2867db2d MediaWikiTestCase -> MediaWikiIntegrationTestCase
MediaWikiTestCase has been renamed to MediaWikiIntegrationTestCase in 1.34.

Bug: T293043
Change-Id: Icef9bbb1c515b775ccdcf6bc692c8c2cab4ae503
2021-10-12 00:51:10 +02:00
Petr Pchelko da8e918fb3 Enable most tests which were previously disabled
Additionally - remove RestbaseInterface::checkBackend.
When HTTP requests are banned from unit tests this method
makes no sence.

MathoidCli tests were not reenabled cause it's a bit hard
to mock shell acceess. Hopefully as part of Shellbox
transition we can have MockShell trait in core and reenable
those tests

Bug: T265628
Depends-On: I350ed59af603a0504704af3265787a4be8f2dc2a
Change-Id: I294d0ed905193850dc38cb3071eb9b31c8863121
2021-08-12 08:57:58 -07:00
libraryupgrader b409746fc6 build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 36.0.0 → 37.0.0

npm:
* postcss: 7.0.35 → 7.0.36
  * https://npmjs.com/advisories/1693 (CVE-2021-23368)
* ws: 7.3.0 → 7.5.3
  * https://npmjs.com/advisories/1748 (CVE-2021-32640)
* glob-parent: 5.1.1 → 5.1.2
  * https://npmjs.com/advisories/1751 (CVE-2020-28469)
* trim-newlines: 3.0.0 → 3.0.1
  * https://npmjs.com/advisories/1753 (CVE-2021-33623)
* normalize-url: 4.5.0 → 4.5.1
  * https://npmjs.com/advisories/1755 (CVE-2021-33502)

Change-Id: Ie14979780cdbd04fa2804f5317e8b0f6b0029470
2021-07-23 02:28:22 +00:00
libraryupgrader c416046515 build: Updating composer dependencies
* mediawiki/mediawiki-codesniffer: 35.0.0 → 36.0.0
* php-parallel-lint/php-parallel-lint: 1.2.0 → 1.3.0

Change-Id: Iccba9c52c8390b00fe1cc31e5f3bed3074e27f85
2021-05-05 06:48:02 +00:00
Reedy b0f07ee605 Namespace extension
Change-Id: I7ba90b35e5b6f6e4c296079fc524667ea41c0980
2021-04-08 01:17:14 +01:00
James D. Forrester 0c6104811c MathCoverageTest: Skip all tests for now as HTTP requests are banned
Bug: T265628
Change-Id: Iaa1ccb50475785061d9da1ff3e7219b38cee145d
2020-10-27 21:48:28 +01:00
Reedy 2c220ddabc Fix PSR12.Properties.ConstantVisibility.NotFound
Bug: T253169
Change-Id: I816b6d26471527137cbddd313cd432f0a37db891
2020-06-05 00:17:18 +00:00
Thiemo Kreuz 852eba3c9e Always call original constructors in tests, and more cleanups
* Get rid of a few more MockBuilders and mocks that aren't needed.
* Make sure the original constructor is always called. This is highly
  relevant for I263a711.
* Fix mixed order in assertions. In PHP, the expected value comes first.
* Add some missing inline @var type hints.

Change-Id: Ia15d62af56dfdb61bc2514aa994ce3d4ecd6e077
2019-11-26 14:42:37 +01:00
Thiemo Kreuz b189280467 Make all @covers tags absolute, and fix some
Some mentioned a "__constructor", which should be "__construct".

The leading backslash is not strictly needed by all tools. But some
need it. I learned it's best practice to always have it.

Change-Id: I22fe3a3b4828c02ab5a457aba9af5af1c72567ea
2019-11-26 11:01:23 +01:00
James D. Forrester 5096e35015 tests: Align return type with PHPUnit 8 requirements
Change-Id: I8c4c64c6e0cd107de10d23d8f564ea660fd86ada
2019-11-01 17:18:33 -07:00
James D. Forrester 6e8ca25d46 build: Upgrade mediawiki-codesniffer to v28.0.0
Change-Id: I620a56f9edab3a751c7c41cd76ef401aac5d3b79
2019-10-11 10:45:11 -07:00
Moritz Schubotz (physikerwelt) a865a8565a
Add tracking category for deprecated mhchem syntax
Gets warning information from restbase and adds tracking categories
for deprecated chemical syntax.
Refactor mechanism to add tracking categories, and avoiding rechecking
already checked formulae.

Depends on: Ieca66f45ae7685d61eece1624bd7ff65ccad2eaa
Change-Id: I10e78ab79015dc1331f645c60b25bbbd237e23fe
2018-10-27 20:38:02 +02:00
Thiemo Kreuz 5648b8e2c3 Make use of the …::class feature whenever possible
Note that a class is not resolved this was. …::class is not a function
call. It's more like a named string constant. Technically still a
string. The advantage is that IDEs and tools like linters can much easier
understand that these strings refer to a class, and list them in usage
reports, renames, and such.

Change-Id: I5225543dbb837685a1840837cb2772dd576cca38
2018-06-06 12:13:04 +02:00
Moritz Schubotz (physikerwelt) 88546ae1ad
Move phpunit test files
* currently the phpunit tests are not triggered by jenkins
* some test can't be re-enabled possible reasons:
** the texvc and texvccheck binaries are not available from jenkins
** the binaries can not be generated
** the path to the binaries are not set up correctly

Bug: T142120
Change-Id: I0c8fe5ad652c4663eeb029781521acbf56e42bad
2018-04-22 10:09:12 +02:00
Renamed from tests/MathRendererTest.php (Browse further)