From a38a6f25d7e46f47a8f358bb16c766f5b96dae45 Mon Sep 17 00:00:00 2001 From: Klap-in Date: Tue, 21 May 2013 21:41:40 +0200 Subject: fix some minor typos in fetch_imagetoken.test.php --- _test/tests/lib/exe/fetch_imagetoken.test.php | 44 +++++++++++++-------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to '_test') diff --git a/_test/tests/lib/exe/fetch_imagetoken.test.php b/_test/tests/lib/exe/fetch_imagetoken.test.php index 9e5b6e4a2..99e642557 100644 --- a/_test/tests/lib/exe/fetch_imagetoken.test.php +++ b/_test/tests/lib/exe/fetch_imagetoken.test.php @@ -23,10 +23,10 @@ class fetch_imagetoken_test extends DokuWikiTest { parent::setUp(); global $conf; - $conf['sendfile'] = 0; + $conf['xsendfile'] = 0; global $MIME, $EXT, $CACHE, $INPUT; // variables fetch creates in global scope -- should this be in fetch? - } + } function getUri() { $w = $this->width ? 'w='.$this->width.'&' : ''; @@ -39,14 +39,14 @@ class fetch_imagetoken_test extends DokuWikiTest { $request = new TestRequest(); return $request->get(array(),str_replace('{%token%}',$token,$this->getUri())); } - - /** + + /** * modified image request with valid token * expect: header with mime-type * expect: content * expect: no error response - */ - function test_valid_token(){ + */ + function test_valid_token(){ $valid_token = 'tok='.media_get_token($this->media, $this->width, $this->height).'&'; $response = $this->fetchResponse($valid_token); $this->assertTrue((bool)$response->getHeader('Content-Type')); @@ -54,24 +54,24 @@ class fetch_imagetoken_test extends DokuWikiTest { $status_code = $response->getStatusCode(); $this->assertTrue(is_null($status_code) || (200 == $status_code)); - } - - /** + } + + /** * modified image request with invalid token - * expect: 412 status code - */ - function test_invalid_token(){ - $invalid_token = 'tok='.media_get_token('junk',200,100).'&'; - $this->assertEquals(412,$this->fetchResponse($invalid_token)->getStatusCode()); - } - - /** - * modified image request with no token * expect: 412 status code - */ - function test_missing_token(){ - $no_token = ''; - $this->assertEquals(412,$this->fetchResponse($notoken)->getStatusCode()); + */ + function test_invalid_token(){ + $invalid_token = 'tok='.media_get_token('junk',200,100).'&'; + $this->assertEquals(412,$this->fetchResponse($invalid_token)->getStatusCode()); + } + + /** + * modified image request with no token + * expect: 412 status code + */ + function test_missing_token(){ + $no_token = ''; + $this->assertEquals(412,$this->fetchResponse($no_token)->getStatusCode()); } /** -- cgit v1.2.3