PortableInfobox/tests/phpunit/PortableInfoboxTemplateEngineTest.php
2018-08-16 11:25:53 +02:00

36 lines
834 B
PHP

<?php
/**
* @group PortableInfobox
* @covers PortableInfobox\Helpers\PortableInfoboxTemplateEngine
*/
class PortableInfoboxTemplateEngineTest extends MediaWikiTestCase {
/**
* @covers PortableInfobox\Helpers\PortableInfoboxTemplateEngine::isSupportedType
* @dataProvider isTypeSupportedInTemplatesDataProvider
*/
public function testIsTypeSupportedInTemplates( $type, $result, $description ) {
$this->assertEquals(
$result,
PortableInfobox\Helpers\PortableInfoboxTemplateEngine::isSupportedType( $type ),
$description
);
}
public function isTypeSupportedInTemplatesDataProvider() {
return [
[
'type' => 'title',
'result' => true,
'description' => 'valid data type'
],
[
'type' => 'invalidTestType',
'result' => false,
'description' => 'invalid data type'
]
];
}
}