2017-02-20 04:33:24 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @group TemplateStyles
|
2018-02-06 02:19:30 +00:00
|
|
|
* @covers TemplateStylesContentHandler
|
2017-02-20 04:33:24 +00:00
|
|
|
*/
|
|
|
|
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 ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|