mirror of
https://github.com/Universal-Omega/PortableInfobox.git
synced 2024-12-04 20:59:08 +00:00
36 lines
834 B
PHP
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'
|
|
]
|
|
];
|
|
}
|
|
|
|
}
|