Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
672d4b7187
@ -55,17 +55,17 @@ abstract class ListAbstract extends ArrayObject
|
||||
* checks if the given db names exists in the current list, if there is
|
||||
* missing at least one item it returns false otherwise true
|
||||
*
|
||||
* @return boolean true if all items exists, otherwise false
|
||||
* @param mixed ...$params
|
||||
* @return bool true if all items exists, otherwise false
|
||||
*/
|
||||
public function exists()
|
||||
public function exists(...$params)
|
||||
{
|
||||
$this_elements = $this->getArrayCopy();
|
||||
foreach (func_get_args() as $result) {
|
||||
foreach ($params as $result) {
|
||||
if (! in_array($result, $this_elements)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -648,11 +648,11 @@ class Message
|
||||
/**
|
||||
* wrapper for sprintf()
|
||||
*
|
||||
* @param mixed ...$params
|
||||
* @return string formatted
|
||||
*/
|
||||
static public function format()
|
||||
static public function format(...$params)
|
||||
{
|
||||
$params = func_get_args();
|
||||
if (isset($params[1]) && is_array($params[1])) {
|
||||
array_unshift($params[1], $params[0]);
|
||||
$params = $params[1];
|
||||
|
||||
@ -55,7 +55,7 @@ class AuthenticationHttpTest extends PmaTestCase
|
||||
unset($this->object);
|
||||
}
|
||||
|
||||
public function doMockResponse($set_minimal, $body_id, $set_title)
|
||||
public function doMockResponse($set_minimal, $body_id, $set_title, ...$headers)
|
||||
{
|
||||
// mock footer
|
||||
$mockFooter = $this->getMockBuilder('PhpMyAdmin\Footer')
|
||||
@ -89,7 +89,6 @@ class AuthenticationHttpTest extends PmaTestCase
|
||||
->with();
|
||||
|
||||
// set mocked headers and footers
|
||||
$headers = array_slice(func_get_args(), 3);
|
||||
$mockResponse = $this->mockResponse($headers);
|
||||
|
||||
$mockResponse->expects($this->exactly($set_title))
|
||||
|
||||
@ -33,11 +33,11 @@ class PmaTestCase extends TestCase
|
||||
/**
|
||||
* Creates mock of Response object for header testing
|
||||
*
|
||||
* @param mixed $param parameter for header method
|
||||
* @param mixed ...$param parameter for header method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function mockResponse()
|
||||
public function mockResponse(...$param)
|
||||
{
|
||||
$this->restoreInstance = Response::getInstance();
|
||||
|
||||
@ -55,8 +55,6 @@ class PmaTestCase extends TestCase
|
||||
->with()
|
||||
->will($this->returnValue(false));
|
||||
|
||||
$param = func_get_args();
|
||||
|
||||
if (count($param) > 0) {
|
||||
if (is_array($param[0])) {
|
||||
if (is_array($param[0][0]) && count($param) == 1) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user