MediaWiki REL1_34
HooksTest.php
Go to the documentation of this file.
1<?php
2
3class ScribuntoHooksTest extends PHPUnit\Framework\TestCase {
4 use MediaWikiCoversValidator;
5 use PHPUnit4And6Compat;
6
8 return [
9 [ 'Module:Foo', CONTENT_MODEL_SCRIBUNTO, true ],
10 [ 'Module:Foo/doc', null, true ],
11 [ 'Module:Foo/styles.css', 'sanitized-css', true, 'sanitized-css' ],
12 [ 'Main Page', null, true ],
13 ];
14 }
15
20 public function testContentHandlerDefaultModelFor( $name, $expected,
21 $retVal, $before = null
22 ) {
23 $title = Title::newFromText( $name );
24 $model = $before;
26 $this->assertSame( $retVal, $ret );
27 $this->assertSame( $expected, $model );
28 }
29}
testContentHandlerDefaultModelFor( $name, $expected, $retVal, $before=null)
@covers ScribuntoHooks::contentHandlerDefaultModelFor @dataProvider provideContentHandlerDefaultModel...
Definition HooksTest.php:20
provideContentHandlerDefaultModelFor()
Definition HooksTest.php:7
static contentHandlerDefaultModelFor(Title $title, &$model)
Set the Scribunto content handler for modules.
Definition Hooks.php:263
return true
Definition router.php:94