Page MenuHomeWickedGov Phorge

ActionFactoryIntegrationTest.php
No OneTemporary

Size
934 B
Referenced Files
None
Subscribers
None

ActionFactoryIntegrationTest.php

<?php
use MediaWiki\Actions\ActionFactory;
use MediaWiki\Context\RequestContext;
use MediaWiki\MediaWikiServices;
use MediaWiki\Title\Title;
/**
* Test that runs against all core actions to make sure that
* creating an instance of the action works
*
* @coversNothing
* @group Database
*/
class ActionFactoryIntegrationTest extends MediaWikiIntegrationTestCase {
public function testActionFactoryServiceWiring() {
$services = MediaWikiServices::getInstance();
$actionFactory = $services->getActionFactory();
$context = RequestContext::getMain();
$article = Article::newFromTitle( Title::makeTitle( NS_MAIN, 'ActionFactoryServiceWiringTest' ), $context );
$actionSpecs = ( new ReflectionClassConstant( ActionFactory::class, 'CORE_ACTIONS' ) )->getValue();
foreach ( $actionSpecs as $action => $_ ) {
$this->assertInstanceOf( Action::class, $actionFactory->getAction( $action, $article, $context ) );
}
}
}

File Metadata

Mime Type
text/x-php
Expires
Wed, Aug 19, 14:39 (3 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
ed/f9/58c13d88d728f6e22edc41d6f0a9
Default Alt Text
ActionFactoryIntegrationTest.php (934 B)

Event Timeline