Support for PHP 8 (#2158)

painful 66 commits later: required PHP version bumped to 7.3, plugin updates using migrations necessary!
This commit is contained in:
Kevin Papst
2021-05-31 14:53:22 +02:00
committed by GitHub
parent df6bd30d03
commit 4859ac8ecb
21 changed files with 1157 additions and 1283 deletions

View File

@@ -11,7 +11,6 @@ namespace App\Tests\Ldap;
use App\Entity\User;
use App\Ldap\LdapDriver;
use App\Ldap\LdapDriverException;
use Laminas\Ldap\Exception\LdapException;
use Laminas\Ldap\Ldap;
use PHPUnit\Framework\TestCase;
@@ -61,21 +60,6 @@ class LdapDriverTest extends TestCase
$result = $sut->search('', '', []);
self::assertEquals(['count' => 3, 1, 2, 3], $result);
}
public function testSearchException()
{
$this->expectException(LdapDriverException::class);
$this->expectExceptionMessage('An error occurred with the search operation.');
$zendLdap = $this->getMockBuilder(Ldap::class)->disableOriginalConstructor()->onlyMethods(['bind', 'searchEntries'])->getMock();
$zendLdap->expects($this->once())->method('bind');
$zendLdap->expects($this->once())->method('searchEntries')->willThrowException(
new LdapException($zendLdap, '', LdapException::LDAP_SERVER_DOWN)
);
$sut = new TestLdapDriver($zendLdap);
$sut->search('', '', []);
}
}
class TestLdapDriver extends LdapDriver