Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4106303
ApiEntryPointTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
904 B
Referenced Files
None
Subscribers
None
ApiEntryPointTest.php
View Options
<?php
namespace
MediaWiki\Tests\Api
;
use
MediaWiki\Api\ApiEntryPoint
;
use
MediaWiki\Request\FauxRequest
;
use
MediaWiki\Tests\MockEnvironment
;
/**
* @group API
* @group Database
* @group medium
*
* @covers \MediaWiki\Api\ApiEntryPoint
*/
class
ApiEntryPointTest
extends
ApiTestCase
{
public
function
testSimpleRequest
()
{
$request
=
new
FauxRequest
();
$request
->
setRequestURL
(
'/w/api.php'
);
$env
=
new
MockEnvironment
(
$request
);
$context
=
$env
->
makeFauxContext
();
$entryPoint
=
new
ApiEntryPoint
(
$context
,
$env
,
$this
->
getServiceContainer
()
);
$entryPoint
->
enableOutputCapture
();
$entryPoint
->
run
();
$output
=
$entryPoint
->
getCapturedOutput
();
$this
->
assertStringContainsString
(
'<!DOCTYPE html>'
,
$output
);
$this
->
assertStringContainsString
(
'<title>(pagetitle: (api-help-title))</title>'
,
$output
);
// TODO: Check caching headers and such.
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Aug 18, 19:26 (2 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
2f/89/5f9af62c4a3bc13504ab8aa836f6
Default Alt Text
ApiEntryPointTest.php (904 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment