mirror of
https://github.com/Universal-Omega/PortableInfobox.git
synced 2024-12-04 20:59:08 +00:00
40 lines
829 B
PHP
40 lines
829 B
PHP
<?php
|
|
|
|
use Wikia\PortableInfobox\Helpers\PortableInfoboxMustacheEngine;
|
|
|
|
class PortableInfoboxMustacheEngineTest extends WikiaBaseTest {
|
|
|
|
protected function setUp() {
|
|
$this->setupFile = dirname( __FILE__ ) . '/../PortableInfobox.setup.php';
|
|
parent::setUp();
|
|
}
|
|
|
|
/**
|
|
* @dataProvider testIsTypeSupportedInTemplatesDataProvider
|
|
*/
|
|
public function testIsTypeSupportedInTemplates( $type, $result, $description ) {
|
|
$this->assertEquals(
|
|
$result,
|
|
PortableInfoboxMustacheEngine::isSupportedType( $type ),
|
|
$description
|
|
);
|
|
}
|
|
|
|
public function testIsTypeSupportedInTemplatesDataProvider() {
|
|
return [
|
|
[
|
|
'type' => 'title',
|
|
'result' => true,
|
|
'description' => 'valid data type'
|
|
],
|
|
[
|
|
'type' => 'invalidTestType',
|
|
'result' => false,
|
|
'description' => 'invalid data type'
|
|
]
|
|
];
|
|
}
|
|
|
|
|
|
}
|