diff options
author | bpirkle <bpirkle@wikimedia.org> | 2025-03-13 14:34:58 -0500 |
---|---|---|
committer | bpirkle <bpirkle@wikimedia.org> | 2025-03-21 11:54:50 -0500 |
commit | bf5f59a1e9f94f4a7c612d657e0e455fde60dd3c (patch) | |
tree | e0c2493316a81d13a78d07f537d75cbe828eefc0 /tests/phpunit/structure/RestStructureTest.php | |
parent | 8e343d805b16b893bde6ec6c61f4d5c519c0ba51 (diff) | |
download | mediawikicore-bf5f59a1e9f94f4a7c612d657e0e455fde60dd3c.tar.gz mediawikicore-bf5f59a1e9f94f4a7c612d657e0e455fde60dd3c.zip |
REST: Make OpenAPI spec info strings translatable
OpenAPI specs include an "info" section that includes strings such
as "title" and "description" that are intended to be human-readable.
Make all such strings translatable.
Bug: T385855
Change-Id: I15285be6d196c0e7fd7e922f23058d7c09b6b31a
Diffstat (limited to 'tests/phpunit/structure/RestStructureTest.php')
-rw-r--r-- | tests/phpunit/structure/RestStructureTest.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/phpunit/structure/RestStructureTest.php b/tests/phpunit/structure/RestStructureTest.php index c772509e0105..6806f1cb61f4 100644 --- a/tests/phpunit/structure/RestStructureTest.php +++ b/tests/phpunit/structure/RestStructureTest.php @@ -112,7 +112,9 @@ class RestStructureTest extends MediaWikiIntegrationTestCase { $context->method( 'getAuthority' )->willReturn( $authority ); $context->method( 'getRequest' )->willReturn( $request ); - $responseFactory = $this->createNoOpMock( ResponseFactory::class ); + $responseFactory = $this->createNoOpMock( ResponseFactory::class, [ 'getFormattedMessage' ] ); + $responseFactory->method( 'getFormattedMessage' )->willReturn( '' ); + $cors = $this->createNoOpMock( CorsUtils::class ); $services = $this->getFakeServiceContainer(); @@ -156,7 +158,9 @@ class RestStructureTest extends MediaWikiIntegrationTestCase { $context->method( 'getAuthority' )->willReturn( $authority ); $context->method( 'getRequest' )->willReturn( $request ); - $responseFactory = $this->createNoOpMock( ResponseFactory::class ); + $responseFactory = $this->createNoOpMock( ResponseFactory::class, [ 'getFormattedMessage' ] ); + $responseFactory->method( 'getFormattedMessage' )->willReturn( '' ); + $cors = $this->createNoOpMock( CorsUtils::class ); $this->router = EntryPoint::createRouter( |