summaryrefslogtreecommitdiff
path: root/tests/phpunit/includes/skins/SkinTemplateTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/includes/skins/SkinTemplateTest.php')
-rw-r--r--tests/phpunit/includes/skins/SkinTemplateTest.php43
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/phpunit/includes/skins/SkinTemplateTest.php b/tests/phpunit/includes/skins/SkinTemplateTest.php
new file mode 100644
index 00000000..baa995d4
--- /dev/null
+++ b/tests/phpunit/includes/skins/SkinTemplateTest.php
@@ -0,0 +1,43 @@
+<?php
+
+/**
+ * @covers SkinTemplate
+ *
+ * @group Output
+ *
+ * @licence GNU GPL v2+
+ * @author Bene* < benestar.wikimedia@gmail.com >
+ */
+
+class SkinTemplateTest extends MediaWikiTestCase {
+ /**
+ * @dataProvider makeListItemProvider
+ */
+ public function testMakeListItem( $expected, $key, $item, $options, $message ) {
+ $template = $this->getMockForAbstractClass( 'BaseTemplate' );
+
+ $this->assertEquals(
+ $expected,
+ $template->makeListItem( $key, $item, $options ),
+ $message
+ );
+ }
+
+ public function makeListItemProvider() {
+ return array(
+ array(
+ '<li class="class" title="itemtitle"><a href="url" title="title">text</a></li>',
+ '',
+ array(
+ 'class' => 'class',
+ 'itemtitle' => 'itemtitle',
+ 'href' => 'url',
+ 'title' => 'title',
+ 'text' => 'text'
+ ),
+ array(),
+ 'Test makteListItem with normal values'
+ )
+ );
+ }
+}