104180aa9SAndreas Gohr<?php 204180aa9SAndreas Gohr 30884c254SAndreas Gohrclass utf8_strtolower_test extends DokuWikiTest 40884c254SAndreas Gohr{ 504180aa9SAndreas Gohr 60884c254SAndreas Gohr /** 70884c254SAndreas Gohr * @see testGivens 80884c254SAndreas Gohr * @return array 90884c254SAndreas Gohr */ 100884c254SAndreas Gohr public function provideGivens() 110884c254SAndreas Gohr { 120884c254SAndreas Gohr return [ 130884c254SAndreas Gohr ['Αρχιτεκτονική Μελέτη', 'αρχιτεκτονική μελέτη'], // FS#2173 140884c254SAndreas Gohr ['ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'], 150884c254SAndreas Gohr ['players:Bruce', 'players:bruce'], 160884c254SAndreas Gohr ['players:GERALD', 'players:gerald'], 17*a1c26920SAndreas Gohr [ 18*a1c26920SAndreas Gohr 'Α Β Γ Δ Ε Ϝ Ϛ Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο Π Ϟ ϙ Ρ Σ Τ Υ Φ Χ Ψ Ω Ϡ', 19*a1c26920SAndreas Gohr 'α β γ δ ε ϝ ϛ ζ η θ ι κ λ μ ν ξ ο π ϟ ϙ ρ σ τ υ φ χ ψ ω ϡ' 20*a1c26920SAndreas Gohr ], // #3188 210884c254SAndreas Gohr ]; 220884c254SAndreas Gohr } 2304180aa9SAndreas Gohr 240884c254SAndreas Gohr /** 250884c254SAndreas Gohr * @dataProvider provideGivens 260884c254SAndreas Gohr * @param string $input 270884c254SAndreas Gohr * @param string $expected 280884c254SAndreas Gohr */ 290884c254SAndreas Gohr public function testGivens($input, $expected) 300884c254SAndreas Gohr { 318cbc5ee8SAndreas Gohr $this->assertEquals($expected, \dokuwiki\Utf8\PhpString::strtolower($input)); 3204180aa9SAndreas Gohr // just make sure our data was correct 330884c254SAndreas Gohr $this->assertEquals($expected, mb_strtolower($input, 'utf-8'), 'mbstring check'); 3404180aa9SAndreas Gohr } 3504180aa9SAndreas Gohr} 36