From 7a0e7d6081cd2fb47b3f895d3224c3b0db47f3c8 Mon Sep 17 00:00:00 2001
From: Tim van Dijen <tvdijen@gmail.com>
Date: Thu, 18 Oct 2018 15:38:45 +0200
Subject: [PATCH] Fix tests

---
 tests/lib/SimpleSAML/Utils/CryptoTest.php           | 10 +++++-----
 tests/modules/core/lib/Auth/UserPassOrgBaseTest.php |  6 +-----
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/tests/lib/SimpleSAML/Utils/CryptoTest.php b/tests/lib/SimpleSAML/Utils/CryptoTest.php
index db0080f56..231945969 100644
--- a/tests/lib/SimpleSAML/Utils/CryptoTest.php
+++ b/tests/lib/SimpleSAML/Utils/CryptoTest.php
@@ -34,7 +34,7 @@ class CryptoTest extends TestCase
      *
      * @expectedException \InvalidArgumentException
      *
-     * @covers \SimpleSAML\Utils\Crypto::_aesDecrypt
+     * @covers \SimpleSAML\Utils\Crypto::aesDecrypt
      */
     public function testAesDecryptBadInput()
     {
@@ -50,7 +50,7 @@ class CryptoTest extends TestCase
      *
      * @expectedException \InvalidArgumentException
      *
-     * @covers \SimpleSAML\Utils\Crypto::_aesEncrypt
+     * @covers \SimpleSAML\Utils\Crypto::aesEncrypt
      */
     public function testAesEncryptBadInput()
     {
@@ -65,7 +65,7 @@ class CryptoTest extends TestCase
      * Test that aesDecrypt() works properly, being able to decrypt some previously known (and correct)
      * ciphertext.
      *
-     * @covers \SimpleSAML\Utils\Crypto::_aesDecrypt
+     * @covers \SimpleSAML\Utils\Crypto::aesDecrypt
      */
     public function testAesDecrypt()
     {
@@ -86,8 +86,8 @@ class CryptoTest extends TestCase
     /**
      * Test that aesEncrypt() produces ciphertexts that aesDecrypt() can decrypt.
      *
-     * @covers \SimpleSAML\Utils\Crypto::_aesDecrypt
-     * @covers \SimpleSAML\Utils\Crypto::_aesEncrypt
+     * @covers \SimpleSAML\Utils\Crypto::aesDecrypt
+     * @covers \SimpleSAML\Utils\Crypto::aesEncrypt
      */
     public function testAesEncrypt()
     {
diff --git a/tests/modules/core/lib/Auth/UserPassOrgBaseTest.php b/tests/modules/core/lib/Auth/UserPassOrgBaseTest.php
index 317301b32..7db0605b0 100644
--- a/tests/modules/core/lib/Auth/UserPassOrgBaseTest.php
+++ b/tests/modules/core/lib/Auth/UserPassOrgBaseTest.php
@@ -25,14 +25,10 @@ class UserPassOrgBaseTest extends \PHPUnit_Framework_TestCase
             ]
         ];
 
-        // When PHP 5.4 support is dropped, replace with:
-        // $mockUserPassOrgBase = $this->getMockBuilder(\SimpleSAML\Module\core\Auth\UserPassOrgBase::class)
-        $multi = new \SimpleSAML\Module\ldap\Auth\Source\LDAPMulti(['AuthId' => 'my-org']);
-        $mockUserPassOrgBase = $this->getMockBuilder(get_parent_class($multi, []))
+        $mockUserPassOrgBase = $this->getMockBuilder(\SimpleSAML\Module\core\Auth\UserPassOrgBase::class)
             ->setConstructorArgs([['AuthId' => 'my-org'], &$config])
             ->setMethods([])
             ->getMockForAbstractClass();
-
         $this->assertTrue($mockUserPassOrgBase->getRememberOrganizationEnabled());
     }
 }
-- 
GitLab