mediawiki-extensions-Templa.../tests/phpunit/TemplateStylesContentHandlerTest.php

22 lines
610 B
PHP
Raw Normal View History

<?php
/**
* @group TemplateStyles
*/
class TemplateStylesContentHandlerTest extends MediaWikiLangTestCase {
public function testBasics() {
$handler = new TemplateStylesContentHandler();
$this->assertSame( 'sanitized-css', $handler->getModelID() );
$this->assertSame( [ 'text/css' ], $handler->getSupportedFormats() );
$this->assertInstanceOf( TemplateStylesContent::class, $handler->makeEmptyContent() );
$this->assertFalse( $handler->supportsRedirects() );
$title = Title::newFromText( 'Template:Example/styles.css' );
$this->assertNull( $handler->makeRedirectContent( $title ) );
}
}