daux.io/tests/DauxHelperTest.php

26 lines
705 B
PHP
Raw Permalink Normal View History

<?php namespace Todaymade\Daux;
2016-07-27 21:32:51 +02:00
class DauxHelperTest extends \PHPUnit_Framework_TestCase
{
public function providerGetFilenames()
{
return [
2016-07-27 21:32:51 +02:00
[['Page.html', 'Page'], 'Page.html'],
[['Page.html', 'Page'], 'Page.md'],
[['Page.html', 'Page'], 'Page'],
[['Code_Highlighting.html', 'Code_Highlighting'], '05_Code_Highlighting.md'],
];
}
/**
* @dataProvider providerGetFilenames
*/
2016-07-27 21:32:51 +02:00
public function testGetFilenames($expected, $node)
{
$config = new Config();
$config['valid_content_extensions'] = ['md'];
$this->assertEquals($expected, DauxHelper::getFilenames($config, $node));
}
}