From cfa6c0920b513ff7f18d1c0025709190660f0675 Mon Sep 17 00:00:00 2001
From: Thijs Kinkhorst <thijs@kinkhorst.com>
Date: Tue, 13 Nov 2018 19:56:44 +0000
Subject: [PATCH] Modern array syntax also for tests

---
 .../SimpleSAML/Utils/Config/MetadataTest.php  | 20 +++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/tests/lib/SimpleSAML/Utils/Config/MetadataTest.php b/tests/lib/SimpleSAML/Utils/Config/MetadataTest.php
index 70edeb6fc..f7aa338af 100644
--- a/tests/lib/SimpleSAML/Utils/Config/MetadataTest.php
+++ b/tests/lib/SimpleSAML/Utils/Config/MetadataTest.php
@@ -268,7 +268,7 @@ class MetadataTest extends TestCase
     {
         // Test null or unset
         $nameIdPolicy = null;
-        $this->assertEquals(Metadata::parseNameIdPolicy($nameIdPolicy), array('Format' => \SAML2\Constants::NAMEID_TRANSIENT));
+        $this->assertEquals(Metadata::parseNameIdPolicy($nameIdPolicy), ['Format' => \SAML2\Constants::NAMEID_TRANSIENT]);
 
         // Test false
         $nameIdPolicy = false;
@@ -276,27 +276,27 @@ class MetadataTest extends TestCase
 
         // Test string
         $nameIdPolicy = 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress';
-        $this->assertEquals(Metadata::parseNameIdPolicy($nameIdPolicy), array('Format' => 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress'));
+        $this->assertEquals(Metadata::parseNameIdPolicy($nameIdPolicy), ['Format' => 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress']);
 
         // Test array
-        $nameIdPolicy = array(
+        $nameIdPolicy = [
             'Format' => 'urn:oasis:names:tc:SAML:1.1:nameid-format:persistent',
             'AllowCreate' => false
-        );
-        $this->assertEquals(Metadata::parseNameIdPolicy($nameIdPolicy), array(
+        ];
+        $this->assertEquals(Metadata::parseNameIdPolicy($nameIdPolicy), [
             'Format' => 'urn:oasis:names:tc:SAML:1.1:nameid-format:persistent',
             'AllowCreate' => false
-        ));
+        ]);
 
-        $nameIdPolicy = array(
+        $nameIdPolicy = [
             'Format' => 'urn:oasis:names:tc:SAML:1.1:nameid-format:persistent',
             'AllowCreate' => false,
             'SPNameQualifier' => 'TEST'
-        );
-        $this->assertEquals(Metadata::parseNameIdPolicy($nameIdPolicy), array(
+        ];
+        $this->assertEquals(Metadata::parseNameIdPolicy($nameIdPolicy), [
             'Format' => 'urn:oasis:names:tc:SAML:1.1:nameid-format:persistent',
             'AllowCreate' => false,
             'SPNameQualifier' => 'TEST'
-        ));
+        ]);
     }
 }
-- 
GitLab