assertEquals(DOKU_BASE . $this->script . '?media=' , ml()); } function test_ml_args_array() { global $conf; $conf['useslash'] = 0; $conf['userewrite'] = 0; $args = array('a' => 'b', 'c' => 'd', 'q' => '&รค'); $expect = DOKU_BASE . $this->script . '?a=b&c=d&q=%26%C3%A4&media=some:'; $this->assertEquals($expect, ml('some:', $args)); } function test_ml_args_string() { global $conf; $conf['useslash'] = 0; $conf['userewrite'] = 0; $args = 'a=b&c=d'; $expect = DOKU_BASE . $this->script . '?a=b&c=d&media=some:'; $this->assertEquals($expect, ml('some:', $args)); } function test_ml_args_comma_string() { global $conf; $conf['useslash'] = 0; $conf['userewrite'] = 0; $args = 'a=b,c=d'; $expect = DOKU_BASE . $this->script . '?a=b&c=d&media=some:'; $this->assertEquals($expect, ml('some:', $args)); } function test_ml_imgresize_array() { global $conf; $conf['useslash'] = 0; $conf['userewrite'] = 0; $id = 'some:'; $w = 80; $args = array('w' => $w); $tok = media_get_token($id,$w,0); $expect = DOKU_BASE . $this->script . '?w='.$w.'&tok='.$tok.'&media='.$id; $this->assertEquals($expect, ml($id, $args)); } function test_ml_imgresize_string() { global $conf; $conf['useslash'] = 0; $conf['userewrite'] = 0; $id = 'some:'; $w = 80; $args = 'w='.$w; $tok = media_get_token($id,$w,0); $expect = DOKU_BASE . $this->script . '?w='.$w.'&tok='.$tok.'&media='.$id; $this->assertEquals($expect, ml($id, $args)); } }