Commit graph

5 commits

Author SHA1 Message Date
Tim Starling
e582572622 Improve ObjectCache integration tests
* Add BagOStuffTest subclasses for all core BagOStuff subclasses,
  replacing PHPUNIT_USE_BAGOSTUFF, as suggested in a todo comment.
* Add config $wgEnableRemoteBagOStuffTests which causes all tests
  enabled by $wgObjectCache to execute, which means that the memcached
  tests are executed by default.

I have verified all except RESTBagOStuff and WinCacheBagOStuff. The
memcached tests fail against memcached 1.5.x but pass against memcached
1.6.x.

Bug: T90875
Change-Id: Id74b5226669f8cb857f859fbc35bc58ab001e873
2022-02-11 10:20:33 +11:00
libraryupgrader
5357695270 build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 36.0.0 → 37.0.0
  The following sniffs now pass and were enabled:
  * Generic.ControlStructures.InlineControlStructure
  * MediaWiki.PHPUnit.AssertCount.NotUsed

npm:
* svgo: 2.3.0 → 2.3.1
  * https://npmjs.com/advisories/1754 (CVE-2021-33587)

Change-Id: I2a9bbee2fecbf7259876d335f565ece4b3622426
2021-07-22 03:36:05 +00:00
daniel
ddc3f55a5a phpunit: Remove the PHPUNIT_REUSE_DB / --reuse-db option
This option has been dysfunctional since at least MW 1.32: with
the option set, no tables would be cloned, and all tests trying to
access the database would fail.

Apparently the option was originally introduced to improve speed
when testing against a Oracle database backend in
5933586266.

Since nobody complained about the option being broken,
and we no longer support Oracle, it should just be removed.

Bug: T283146
Change-Id: I7d7f10b2c863ab92279c7817893086ad50e6ac4d
2021-05-19 12:19:59 -07:00
Daimona Eaytoy
6507d6b2a4 phpunit.php: Move remaining CLI options to env variables
And write release notes for all changes so far.

Note: This should be announced to wikitech-l after merging.

Bug: T90875
Change-Id: I597ed2b5666f4214173609f7e77e23dbc4fd81ae
2021-05-18 12:34:39 +02:00
Florian
d7c72bcbe5 Fix broken running tests locally in IDE
The class PHPMaintClass is meant to be loaded when running phpunit.php
which is only done when running tests with it. When running tests by
using the bootstrap file only, e.g. in an IDE, this class will not be
available. Relying on it in other classes will therefore break them.

Moving the required parts to another outside class and add it to the
test autoloader. My feeling says, that adding the PHPMaintClass to the
autoloader says "NOOOO", that's why I added a new one.

There also seems to be some CI builds failing because of that:
https://integration.wikimedia.org/ci/hob/quibble-vendor-mysql-php72-docker/30642/console

Bug: T151101
Change-Id: I33e27009657a951173694fc847973560a1ce967b
2019-11-21 16:28:12 +00:00