aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/page/ImagePageTest.php
Commit message (Collapse)AuthorAgeFilesLines
* Namespace all remaining files in includes/pageJames D. Forrester2025-03-181-2/+3
| | | | | Bug: T353458 Change-Id: I7a9c74f2106655d41ae029742090253f541bd4a6
* tests: Fix @covers and @coversDefaultClass to have leading \Reedy2024-02-161-2/+2
| | | | Change-Id: I5629f91387f2ac453ee4341bfe4bba310bd52f03
* Fix more non-database tests accessing the databaseDaimona Eaytoy2023-08-061-0/+1
| | | | | | | | Mock the needed services, or set fixed values to avoid DB lookups, when possible. Add the test to the Database group otherwise, e.g. for things like Skin and Parser that use global state all over the place. Change-Id: I8d87013d89accaf04d0ac19cb4b7216290383eb5
* tests: Make some PHPUnit data providers staticTim Starling2023-03-241-2/+2
| | | | | | | | | | | | | Just methods where adding "static" to the declaration was enough, I didn't do anything with providers that used $this. Initially by search and replace. There were many mistakes which I found mostly by running the PHPStorm inspection which searches for $this usage in a static method. Later I used the PHPStorm "make static" action which avoids the more obvious mistakes. Bug: T332865 Change-Id: I47ed6692945607dfa5c139d42edbd934fa4f3a36
* Reorg: Namespace the Title classJames D. Forrester2023-03-021-0/+1
| | | | | | | | | | | | | | | | | | | This is moderately messy. Process was principally: * xargs rg --files-with-matches '^use Title;' | grep 'php$' | \ xargs -P 1 -n 1 sed -i -z 's/use Title;/use MediaWiki\\Title\\Title;/1' * rg --files-without-match 'MediaWiki\\Title\\Title;' . | grep 'php$' | \ xargs rg --files-with-matches 'Title\b' | \ xargs -P 1 -n 1 sed -i -z 's/\nuse /\nuse MediaWiki\\Title\\Title;\nuse /1' * composer fix Then manual fix-ups for a few files that don't have any use statements. Bug: T166010 Follows-Up: Ia5d8cb759dc3bc9e9bbe217d0fb109e2f8c4101a Change-Id: If8fc9d0d95fc1a114021e282a706fc3e7da3524b
* Reorg: Move some of request related classes to MediaWiki/RequestAmir Sarabadani2022-10-281-0/+1
| | | | | | | | | | | | | | | Redoing I5ea70120d74 but without moving WebRequest that caused issues with phan-taint-plugin. Moving: - DerivativeRequest - FauxRequest - FauxRequestUpload - PathRouter - WebRequestUpload Bug: T321882 Change-Id: I832b133aaf61ee9f6190b0227d2f3de99bd1717b
* Revert "Reorg: Move some of request related classes to MediaWiki/Request"Zabe2022-10-271-1/+0
| | | | | | | | | This reverts commit 2bdc0b2b7209441a42a784157633a8a01b321922. Reason for revert: T166010#8349431 Bug: T166010 Change-Id: Idcd3025647aec99532f5d69b9c1718c531761283
* Reorg: Move some of request related classes to MediaWiki/RequestAmir Sarabadani2022-10-261-0/+1
| | | | | | | | | | | | | Moving: - DerivativeRequest - FauxRequest - FauxRequestUpload - PathRouter - WebRequest - WebRequestUpload Bug: T166010 Change-Id: I5ea70120d745f2876ae31d039f3f8a51e49e9ad8
* Migrate from `setMwGlobals()` to `overrideConfigValue(s)`Derick Alangi2022-08-021-10/+14
| | | | Change-Id: I3f167d0e7d59a5aa091c3095a7d96c889d6e7e78
* SVG Language selector should default to page languageDerk-Jan Hartman2022-06-131-9/+25
| | | | | | | | Taking into account the pagelanguage should help take into account the language variant on image pages in languages that have variants. Bug: T310445 Change-Id: Ic821b2de66ed876e47c74ac21cedaad7a70a80fc
* Clean up tests that misused the parameters of assertSame/EqualsFunc2022-02-081-1/+1
| | | | | | | | | | | | Expected value is the first parameter to assertSame() or assertEquals(). And turn to use assertCount() for some assertions aginst count of array. Based on code search `assert(?:Same|Equals)\(.+,.+expected` and I look through files roughly, so some assertions that don't contains 'expected' are also fixed. In the meantime, some assertions that I am not clear about are not touched. Change-Id: I75798b60d29fd19b33f4fdf34ed3c788db420d01
* build: Updating dependencieslibraryupgrader2021-07-221-1/+1
| | | | | | | | | | | | | | 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
* Fix visibility of setUp/tearDownThiemo Kreuz2020-06-161-1/+1
| | | | Change-Id: I636be48eb9f713680abac35d46091f7b49374696
* phpunit: Change optional params before required params to also be requiredMax Semenik2020-03-291-1/+1
| | | | | Bug: T248078 Change-Id: I7e1d4229d84f5960fd496f281084dbec4739da4c
* Add core REST API endpoint for media linksBill Pirkle2020-01-221-45/+0
| | | | | | | | | Add an endpoint to the core REST API to return the list of media files embedded in a page, including certain metadata for each media file. Bug: T236169 Change-Id: I3188848ee7de365d209dfb7da5b885313e9f705b
* tests: Add explicit return type void to setUp() and tearDown()Max Semenik2019-10-301-1/+1
| | | | | | Bug: T192167 Depends-On: I581e54278ac5da3f4e399e33f2c7ad468bae6b43 Change-Id: I3a21fb55db76bac51afdd399cf40ed0760e4f343
* Display translatable images in wiki language on image pagesMax Semenik2019-02-041-6/+46
| | | | | | | | | We currently show SVGs in default languages unless overridden with lang=... URL parameter (and we have UI for setting it). This change makes it display thumbnails in wiki language, if translation is available. Bug: T210814 Change-Id: Ieb0b5e9e27f45b71ef119bb3c1d3f2cd4d7100e5
* Add @covers tags to page testsKunal Mehta2017-12-241-0/+2
| | | | Change-Id: Iadb7e8697e9992ca281b7dfe70cf832c82e194de
* Convert all array() syntax to []Kunal Mehta2016-02-171-39/+39
| | | | | | | | | | Per wikitech-l consensus: https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html Notes: * Disabled CallTimePassByReference due to false positives (T127163) Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
* Move Test files under same folder structure where class is (/includes/)umherirrender2014-12-161-0/+90
Change-Id: I95f1aa6f0ed2cc3306aa6e588a11f359854315c1