Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
made mock before testing function
Signed-off-by: osaid <osaid.nasir@gmail.com>
  • Loading branch information
osaid-r committed Jan 5, 2017
1 parent f1863bf commit 0f3b55c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions test/libraries/core/PMA_headerLocation_test.php
Expand Up @@ -65,14 +65,11 @@ public function testSendHeaderLocationWithoutSidWithIis()

$testUri = 'https://example.com/test.php';

PMA_sendHeaderLocation($testUri); // sets $GLOBALS['header']
$this->mockResponse('Location: ' . $testUri);
PMA_sendHeaderLocation($testUri); // sets $GLOBALS['header']

//reset $GLOBALS['header'] for the next assertion
unset($GLOBALS['header']);

PMA_sendHeaderLocation($testUri, true); // sets $GLOBALS['header']
$this->mockResponse('Refresh: 0; ' . $testUri);
PMA_sendHeaderLocation($testUri, true); // sets $GLOBALS['header']
}

/**
Expand All @@ -84,8 +81,8 @@ public function testSendHeaderLocationWithoutSidWithoutIis()
{
$testUri = 'https://example.com/test.php';

PMA_sendHeaderLocation($testUri); // sets $GLOBALS['header']
$this->mockResponse('Location: ' . $testUri);
PMA_sendHeaderLocation($testUri); // sets $GLOBALS['header']
}

/**
Expand Down

0 comments on commit 0f3b55c

Please sign in to comment.