This commit is contained in:
shibafu 2020-07-31 23:10:54 +09:00
parent c9efcb538c
commit b5901f26bf

View File

@ -70,4 +70,30 @@ class FormatterTest extends TestCase
$formatter->profileImageSrcSet($profileImageProvider, 128, 2)
);
}
/**
* @dataProvider provideNormalizeTagName
*/
public function testNormalizeTagName($input, $expected)
{
$formatter = new Formatter();
$normalized = $formatter->normalizeTagName($input);
$this->assertSame($expected, $normalized);
$this->assertSame($expected, $formatter->normalizeTagName($normalized));
}
public function provideNormalizeTagName()
{
return [
'LowerCase' => ['example', 'example'],
'UpperCase' => ['EXAMPLE', 'example'],
'HalfWidthKana' => ['ティッシュ', 'ティッシュ'],
'FullWidthAlphabet' => ['', 'tissue'],
'組み文字1' => ['13㎝', '13cm'],
'組み文字2' => ['13㌢㍍', '13センチメートル'],
'Script' => ['ℬ𝒶𝒷𝓊𝓂𝒾', 'babumi'],
'分割された濁点' => ['オカス゛', 'オカズ'],
];
}
}