1*b65274ecSPhy<?php 2*b65274ecSPhy 3*b65274ecSPhyclass init_noNS_test extends DokuWikiTest { 4*b65274ecSPhy 5*b65274ecSPhy /** 6*b65274ecSPhy * @dataProvider noNSProvider 7*b65274ecSPhy */ 8*b65274ecSPhy public function test_noNS($input, $expected) 9*b65274ecSPhy { 10*b65274ecSPhy global $conf; 11*b65274ecSPhy $conf['start'] = 'start'; 12*b65274ecSPhy 13*b65274ecSPhy $this->assertSame($expected, noNS($input), $input); 14*b65274ecSPhy } 15*b65274ecSPhy 16*b65274ecSPhy public function noNSProvider() 17*b65274ecSPhy { 18*b65274ecSPhy return [ 19*b65274ecSPhy ['0:0:0', '0'], 20*b65274ecSPhy ['0:0:start', 'start'], 21*b65274ecSPhy ['foo:0', '0'], 22*b65274ecSPhy ['0', '0'], 23*b65274ecSPhy ]; 24*b65274ecSPhy } 25*b65274ecSPhy 26*b65274ecSPhy /** 27*b65274ecSPhy * @dataProvider noNSorNSProvider 28*b65274ecSPhy */ 29*b65274ecSPhy public function test_noNSorNS($input, $expected) 30*b65274ecSPhy { 31*b65274ecSPhy global $conf; 32*b65274ecSPhy $conf['start'] = 'start'; 33*b65274ecSPhy 34*b65274ecSPhy $this->assertSame($expected, noNSorNS($input), $input); 35*b65274ecSPhy } 36*b65274ecSPhy 37*b65274ecSPhy public function noNSorNSProvider() 38*b65274ecSPhy { 39*b65274ecSPhy return [ 40*b65274ecSPhy ['0:0:0', '0'], 41*b65274ecSPhy ['0:0:start', '0'], 42*b65274ecSPhy ['0:start', '0'], 43*b65274ecSPhy ['0:foo', 'foo'], 44*b65274ecSPhy ['foo:0', '0'], 45*b65274ecSPhy ['0', '0'], 46*b65274ecSPhy ]; 47*b65274ecSPhy } 48*b65274ecSPhy 49*b65274ecSPhy} 50*b65274ecSPhy//Setup VIM: ex: et ts=4 : 51