diff --git a/test/classes/BrowseForeignersTest.php b/test/classes/BrowseForeignersTest.php index 81221e7385..6b3130acca 100644 --- a/test/classes/BrowseForeignersTest.php +++ b/test/classes/BrowseForeignersTest.php @@ -47,7 +47,7 @@ class BrowseForeignersTest extends TestCase $method = $class->getMethod($name); $method->setAccessible(true); return $method->invokeArgs( - $object !== null ? $object : $this->browseForeigners, + $object ?? $this->browseForeigners, $params ); } diff --git a/test/classes/CentralColumnsTest.php b/test/classes/CentralColumnsTest.php index 55bc25c937..de4c1d5326 100644 --- a/test/classes/CentralColumnsTest.php +++ b/test/classes/CentralColumnsTest.php @@ -152,7 +152,7 @@ class CentralColumnsTest extends TestCase $method = $class->getMethod($name); $method->setAccessible(true); return $method->invokeArgs( - $object !== null ? $object : $this->centralColumns, + $object ?? $this->centralColumns, $params ); } diff --git a/test/classes/InsertEditTest.php b/test/classes/InsertEditTest.php index 3459f5b09c..8183c05058 100644 --- a/test/classes/InsertEditTest.php +++ b/test/classes/InsertEditTest.php @@ -85,7 +85,7 @@ class InsertEditTest extends TestCase $method = $class->getMethod($name); $method->setAccessible(true); return $method->invokeArgs( - $object !== null ? $object : $this->insertEdit, + $object ?? $this->insertEdit, $params ); } diff --git a/test/classes/Plugins/Export/ExportSqlTest.php b/test/classes/Plugins/Export/ExportSqlTest.php index 64dbe9a6ec..eaa4aa2b09 100644 --- a/test/classes/Plugins/Export/ExportSqlTest.php +++ b/test/classes/Plugins/Export/ExportSqlTest.php @@ -1764,7 +1764,7 @@ class ExportSqlTest extends PmaTestCase $GLOBALS['sql_views_as_tables'] = false; $GLOBALS['sql_include_comments'] = true; $GLOBALS['crlf'] = "\n"; - $oldVal = isset($GLOBALS['sql_compatibility']) ? $GLOBALS['sql_compatibility'] : ''; + $oldVal = $GLOBALS['sql_compatibility'] ?? ''; $GLOBALS['sql_compatibility'] = 'NONE'; $GLOBALS['sql_backquotes'] = true; diff --git a/test/classes/Rte/RoutinesTest.php b/test/classes/Rte/RoutinesTest.php index f70932d9c5..1db33ec40e 100644 --- a/test/classes/Rte/RoutinesTest.php +++ b/test/classes/Rte/RoutinesTest.php @@ -1116,7 +1116,7 @@ class RoutinesTest extends TestCase $errors = []; $this->routines->setGlobals(); - $old_dbi = isset($GLOBALS['dbi']) ? $GLOBALS['dbi'] : null; + $old_dbi = $GLOBALS['dbi'] ?? null; $dbi = $this->getMockBuilder('PhpMyAdmin\DatabaseInterface') ->disableOriginalConstructor() ->getMock(); diff --git a/test/classes/UtilTest.php b/test/classes/UtilTest.php index 61ad68b932..6985fea7ac 100644 --- a/test/classes/UtilTest.php +++ b/test/classes/UtilTest.php @@ -2115,7 +2115,7 @@ class UtilTest extends PmaTestCase */ public function testLinkOrButton(array $params, $limit, $match) { - $restore = isset($GLOBALS['cfg']['LinkLengthLimit']) ? $GLOBALS['cfg']['LinkLengthLimit'] : 1000; + $restore = $GLOBALS['cfg']['LinkLengthLimit'] ?? 1000; $GLOBALS['cfg']['LinkLengthLimit'] = $limit; try { $result = call_user_func_array( diff --git a/test/classes/Utils/HttpRequestTest.php b/test/classes/Utils/HttpRequestTest.php index e114a2be4e..9cc7e75db6 100644 --- a/test/classes/Utils/HttpRequestTest.php +++ b/test/classes/Utils/HttpRequestTest.php @@ -47,7 +47,7 @@ class HttpRequestTest extends PmaTestCase $method = $class->getMethod($name); $method->setAccessible(true); return $method->invokeArgs( - $object !== null ? $object : $this->httpRequest, + $object ?? $this->httpRequest, $params ); }