PMA_sendHeaderLocation called after actually sending headers

This commit is contained in:
osaid 2016-12-13 20:33:37 +05:30
parent 1beb8130ad
commit 800975a73c

View File

@ -369,20 +369,18 @@ class PMA_User_Preferences_Test extends PHPUnit_Framework_TestCase
$mockResponse = $this->getMockBuilder('PMA\libraries\Response')
->disableOriginalConstructor()
->setMethods(array('headersSent', 'header'))
->setMethods(array('header', 'headersSent'))
->getMock();
$mockResponse->expects($this->once())
->method('header')
->with('Location: /phpmyadmin/file.html?a=b&saved=1&server=0#h+ash');
$mockResponse->expects($this->any())
->method('headersSent')
->with()
->will($this->returnValue(false));
$mockResponse->expects($this->once())
->method('header')
->with(
$this->stringContains('Location: /phpmyadmin/file.html?a=b&saved=1&server=0#h+ash')
);
$GLOBALS['PMA_Config']->set('PmaAbsoluteUri', '');
$GLOBALS['cfg']['ServerDefault'] = 1;