PortableInfobox/tests/phpunit/PortableInfoboxTemplateEngineTest.php
2021-12-15 15:01:13 -07:00

36 lines
845 B
PHP

<?php
/**
* @group PortableInfobox
* @covers PortableInfobox\Helpers\PortableInfoboxTemplateEngine
*/
class PortableInfoboxTemplateEngineTest extends MediaWikiIntegrationTestCase {
/**
* @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'
]
];
}
}