mirror of
https://github.com/Universal-Omega/PortableInfobox.git
synced 2024-11-24 00:06:25 +00:00
40 lines
908 B
PHP
40 lines
908 B
PHP
<?php
|
|
|
|
use PortableInfobox\Helpers\PortableInfoboxTemplateEngine;
|
|
|
|
/**
|
|
* @group PortableInfobox
|
|
* @covers \PortableInfobox\Helpers\PortableInfoboxTemplateEngine
|
|
* @coversDefaultClass \PortableInfobox\Helpers\PortableInfoboxTemplateEngine
|
|
*/
|
|
class PortableInfoboxTemplateEngineTest extends MediaWikiIntegrationTestCase {
|
|
|
|
/**
|
|
* @covers ::isSupportedType
|
|
* @dataProvider isTypeSupportedInTemplatesDataProvider
|
|
*/
|
|
public function testIsTypeSupportedInTemplates( $type, $result, $description ) {
|
|
$this->assertEquals(
|
|
$result,
|
|
PortableInfoboxTemplateEngine::isSupportedType( $type ),
|
|
$description
|
|
);
|
|
}
|
|
|
|
public function isTypeSupportedInTemplatesDataProvider() {
|
|
return [
|
|
[
|
|
'type' => 'title',
|
|
'result' => true,
|
|
'description' => 'valid data type'
|
|
],
|
|
[
|
|
'type' => 'invalidTestType',
|
|
'result' => false,
|
|
'description' => 'invalid data type'
|
|
]
|
|
];
|
|
}
|
|
|
|
}
|