This commit is contained in:
shibafu 2020-07-31 23:10:54 +09:00
parent c9efcb538c
commit b5901f26bf
1 changed files with 26 additions and 0 deletions

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'],
'分割された濁点' => ['オカス゛', 'オカズ'],
];
}
}