diff options
author | daniel <dkinzler@wikimedia.org> | 2023-10-27 17:21:45 +0200 |
---|---|---|
committer | daniel <dkinzler@wikimedia.org> | 2024-03-30 21:14:05 +0100 |
commit | 9638fa314a0089a32c366deddb42ea046932d50a (patch) | |
tree | 3de6a136d4ddd14a8e0f670e61f7cb1353f502e0 /tests/common | |
parent | 5c87a85f236a500d7a9e92b92775b568eec8c16d (diff) | |
download | mediawikicore-9638fa314a0089a32c366deddb42ea046932d50a.tar.gz mediawikicore-9638fa314a0089a32c366deddb42ea046932d50a.zip |
Introduce entry point classes for media files.
This moves a code out of file scope into classes to make it
testable. The code is left in the same structure as it was before,
global functions have been converted into methods on the new
ThumbnailEntryPoint and Thumbnail404EntryPoint classes.
This test introduces comprehensive phpunit tests covering all functional
code paths in ThumbnailEntryPoint. This is intended to support
refactoring of this code.
Change-Id: I459abc7b11d0ab4ee682a863c9525a945048296f
Diffstat (limited to 'tests/common')
-rw-r--r-- | tests/common/TestsAutoLoader.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/common/TestsAutoLoader.php b/tests/common/TestsAutoLoader.php index 587fb90ef198..7e6573957c8d 100644 --- a/tests/common/TestsAutoLoader.php +++ b/tests/common/TestsAutoLoader.php @@ -252,6 +252,7 @@ $wgAutoloadClasses += [ 'NullGuzzleClient' => "$testDir/phpunit/mocks/NullGuzzleClient.php", 'NullHttpRequestFactory' => "$testDir/phpunit/mocks/NullHttpRequestFactory.php", 'NullMultiHttpClient' => "$testDir/phpunit/mocks/NullMultiHttpClient.php", + 'MediaWiki\Tests\FileRepo\TestRepoTrait' => "$testDir/phpunit/mocks/filerepo/TestRepoTrait.php", 'MediaWiki\\Tests\\MockEnvironment' => "$testDir/phpunit/mocks/MockEnvironment.php", # tests/phpunit/unit/includes |