Merge "Clean up mediawiki.legacy.upload a bit more"
[lhc/web/wiklou.git] / tests / phpunit / includes / skins / SkinTemplateTest.php
1 <?php
2
3 /**
4 * @covers SkinTemplate
5 *
6 * @group Output
7 *
8 * @licence GNU GPL v2+
9 * @author Bene* < benestar.wikimedia@gmail.com >
10 */
11
12 class SkinTemplateTest extends MediaWikiTestCase {
13 /**
14 * @dataProvider makeListItemProvider
15 */
16 public function testMakeListItem( $expected, $key, $item, $options, $message ) {
17 $template = $this->getMockForAbstractClass( 'BaseTemplate' );
18
19 $this->assertEquals(
20 $expected,
21 $template->makeListItem( $key, $item, $options ),
22 $message
23 );
24 }
25
26 public function makeListItemProvider() {
27 return array(
28 array(
29 '<li class="class" title="itemtitle"><a href="url" title="title">text</a></li>',
30 '',
31 array(
32 'class' => 'class',
33 'itemtitle' => 'itemtitle',
34 'href' => 'url',
35 'title' => 'title',
36 'text' => 'text'
37 ),
38 array(),
39 'Test makteListItem with normal values'
40 )
41 );
42 }
43 }