3 * @group GlobalFunctions
6 class WfBaseNameTest
extends MediaWikiTestCase
{
8 * @dataProvider providePaths
10 public function testBaseName( $fullpath, $basename ) {
11 $this->assertEquals( $basename, wfBaseName( $fullpath ),
12 "wfBaseName('$fullpath') => '$basename'" );
15 public static function providePaths() {
29 [ '\\aaaa\\', 'aaaa' ],
30 [ '\\aaaa\\', 'aaaa' ],
32 '/mnt/upload3/wikipedia/en/thumb/8/8b/'
33 . 'Zork_Grand_Inquisitor_box_cover.jpg/93px-Zork_Grand_Inquisitor_box_cover.jpg',
34 '93px-Zork_Grand_Inquisitor_box_cover.jpg'
36 [ 'C:\\Progra~1\\Wikime~1\\Wikipe~1\\VIEWER.EXE', 'VIEWER.EXE' ],
37 [ 'Östergötland_coat_of_arms.png', 'Östergötland_coat_of_arms.png' ],