Merge "Only generate date header when rendering is guaranteed"
[lhc/web/wiklou.git] / tests / phpunit / includes / 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 /**
15 * @dataProvider makeListItemProvider
16 */
17 public function testMakeListItem( $expected, $key, $item, $options, $message ) {
18 $template = $this->getMockForAbstractClass( 'BaseTemplate' );
19
20 $this->assertEquals(
21 $expected,
22 $template->makeListItem( $key, $item, $options ),
23 $message
24 );
25 }
26
27 public function makeListItemProvider() {
28 return array(
29 array(
30 '<li class="class" title="itemtitle"><a href="url" title="title">text</a></li>',
31 '',
32 array( 'class' => 'class', 'itemtitle' => 'itemtitle', 'href' => 'url', 'title' => 'title', 'text' => 'text' ),
33 array(),
34 'Test makteListItem with normal values'
35 )
36 );
37 }
38 }