Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMaurício Meneghini Fauth <mauriciofauth@gmail.com>2018-04-13 09:08:03 +0300
committerMaurício Meneghini Fauth <mauriciofauth@gmail.com>2018-04-13 09:08:03 +0300
commite24074b4b25b420789217611d749e90e1319871d (patch)
treea41a7fa24bea7401e05032275380dcf572e24267 /test
parent65c5a13debf2c7d4bfd9cbc1144fc616c52ed002 (diff)
Replace func_get_args by ... operator
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/classes/Plugins/Auth/AuthenticationHttpTest.php3
-rw-r--r--test/classes/PmaTestCase.php6
2 files changed, 3 insertions, 6 deletions
diff --git a/test/classes/Plugins/Auth/AuthenticationHttpTest.php b/test/classes/Plugins/Auth/AuthenticationHttpTest.php
index 4fc2338d51..ac72bd292e 100644
--- a/test/classes/Plugins/Auth/AuthenticationHttpTest.php
+++ b/test/classes/Plugins/Auth/AuthenticationHttpTest.php
@@ -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))
diff --git a/test/classes/PmaTestCase.php b/test/classes/PmaTestCase.php
index b2e72b7a51..d00a500a1b 100644
--- a/test/classes/PmaTestCase.php
+++ b/test/classes/PmaTestCase.php
@@ -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) {