Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
RemoveAccentsTest.php
Go to the documentation of this file.
1 <?php
7 
8 class RemoveAccentsTest extends \PHPUnit\Framework\TestCase
9 {
17  public function testRemoveAccents($string, $german, $expected)
18  {
19  $filter = new \Magento\Framework\Filter\RemoveAccents($german);
20  $this->assertEquals($expected, $filter->filter($string));
21  }
22 
26  public function removeAccentsDataProvider()
27  {
28  return [
29  'general conversion' => ['ABCDEFGHIJKLMNOPQRSTUVWXYZ', false, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'],
30  'conversion with german specifics' => ['äöüÄÖÜß', true, 'aeoeueAeOeUess']
31  ];
32  }
33 }