/** * Get the possible output file names for a source file. * * @param Config $config * @param string $part * @return string[] */ public static function getFilenames(Config $config, $part) { $extensions = implode('|', array_map('preg_quote', $config['valid_content_extensions'])) . '|html'; $raw = preg_replace('/(.*)?\\.(' . $extensions . ')$/', '$1', $part); $raw = Builder::removeSortingInformations($raw); return ["{$raw}.html", $raw]; }
/** * @dataProvider providerRemoveSorting */ public function testRemoveSorting($value, $expected) { $this->assertEquals($expected, Builder::removeSortingInformations($value)); }