Commit graph

6 commits

Author SHA1 Message Date
thiemowmde
3d65c37ba4 Fix remaining link numeric ids in LinkHolderArrayTest
These specific placeholders are meant to stay untouched in the test.
Because of this it technically doesn't matter if the namespace numbers
and link ids (from Parser::nextLinkID) are numeric. Still I find it
less confusing when the test setup reflects how the code actually
behaves. An IWLINK is identified by a single numeric id, and a LINK by
a namespace:numeric id pair.

This is split from Ie994059 to make it easier to review.

Change-Id: I1141de06eb3235d199a3dc02ef0a24d0d4fe1416
2022-12-09 12:04:40 +01:00
thiemowmde
c05e0183ad Fix bogus test setup in LinkHolderArrayTest
These array keys are all meant to come from Parser::nextLinkID(). That
returns a positive integer. Let's please make the tests reflect what
the code actually does to reduce confusion.

I tried my best to come up with a mapping that still (possibly even
better) makes it obvious what's happening.

Change-Id: Ib5d5f6f48ddc8c066961ea0f36a922ae9f0c6f6c
2022-12-09 12:01:18 +01:00
thiemowmde
f846177e33 Fix bogus non-numeric namespaces in LinkHolderArrayTest
The first level in LinkHolderArray::$internals is indexed by numeric
namespace id. This must be a number. Let's please make the test
reflect what the code actually does.

Note the same mistake was already fixed before in I7e71ffc.

Change-Id: I14f717510a71adf8ea3f75e61ba844d93838f945
2022-12-09 11:46:26 +01:00
Tim Starling
f7f6f0d700 Update LinkHolderArray tests for new HookContainer parameter
Change-Id: I63fc731ca1dbaef6f215279ee0b1788e735783df
2020-06-23 09:00:32 +10:00
Thiemo Kreuz
6363d64112 parser: Add Title type hint to LinkHolderArray::makeHolder
We *know* this can never be anything but a Title object:
https://codesearch.wmflabs.org/search/?q=makeHolder

Change-Id: Id6de0df627f2aeda79c6483f12a6d500ccd7853f
2020-06-22 14:33:04 +00:00
ArtBaltai
757072d182 New unit and integraton tests for class LinkHolderArray
Bug: T243747
Change-Id: I2c12cc76a9bf01eb527db3ea038e4adc59446cac
2020-06-04 11:38:40 +00:00