Kanboard now requires PHP >= 7.2 since other versions are deprecated

This commit is contained in:
Timo
2020-01-14 21:02:31 +01:00
committed by Frédéric Guillot
parent 7731dde413
commit 64397f45fa
39 changed files with 520 additions and 363 deletions

View File

@@ -26,7 +26,7 @@ class ActionManagerTest extends Base
public function testGetActionNotFound()
{
$this->setExpectedException('RuntimeException', 'Automatic Action Not Found: foobar');
$this->expectException('RuntimeException', 'Automatic Action Not Found: foobar');
$actionManager = new ActionManager($this->container);
$actionManager->getAction('foobar');
}

View File

@@ -25,7 +25,7 @@ class ExternalLinkManagerTest extends Base
{
$externalLinkManager = new ExternalLinkManager($this->container);
$this->setExpectedException('\Kanboard\Core\ExternalLink\ExternalLinkProviderNotFound');
$this->expectException('\Kanboard\Core\ExternalLink\ExternalLinkProviderNotFound');
$externalLinkManager->getProvider('not found');
}
@@ -68,7 +68,7 @@ class ExternalLinkManagerTest extends Base
$externalLinkManager->register($webLinkProvider);
$externalLinkManager->register($attachmentLinkProvider);
$this->setExpectedException('\Kanboard\Core\ExternalLink\ExternalLinkProviderNotFound');
$this->expectException('\Kanboard\Core\ExternalLink\ExternalLinkProviderNotFound');
$externalLinkManager->find();
}
@@ -113,7 +113,7 @@ class ExternalLinkManagerTest extends Base
$externalLinkManager->register($webLinkProvider);
$externalLinkManager->register($attachmentLinkProvider);
$this->setExpectedException('\Kanboard\Core\ExternalLink\ExternalLinkProviderNotFound');
$this->expectException('\Kanboard\Core\ExternalLink\ExternalLinkProviderNotFound');
$externalLinkManager->setUserInput(array('text' => 'https://google.com/', 'type' => 'not found'));
$externalLinkManager->find();
}

View File

@@ -8,7 +8,7 @@ class ExternalTaskManagerTest extends Base
{
public function testProviderNotFound()
{
$this->setExpectedException('Kanboard\Core\ExternalTask\ProviderNotFoundException');
$this->expectException('Kanboard\Core\ExternalTask\ProviderNotFoundException');
$manager = new ExternalTaskManager();
$manager->getProvider('foobar');

View File

@@ -68,7 +68,7 @@ class ClientTest extends \Base
public function testGetLdapServerNotConfigured()
{
$this->setExpectedException('\LogicException');
$this->expectException('\LogicException');
$ldap = new Client;
$ldap->getLdapServer();
}
@@ -100,7 +100,7 @@ class ClientTest extends \Base
)
->will($this->returnValue(false));
$this->setExpectedException('\Kanboard\Core\Ldap\ConnectionException');
$this->expectException('\Kanboard\Core\Ldap\ConnectionException');
$ldap = new Client;
$ldap->open('my_ldap_server');
@@ -150,7 +150,7 @@ class ClientTest extends \Base
)
->will($this->returnValue(false));
$this->setExpectedException('\Kanboard\Core\Ldap\ConnectionException');
$this->expectException('\Kanboard\Core\Ldap\ConnectionException');
$ldap = new Client;
$ldap->open('my_ldap_server', 389, true);
@@ -175,7 +175,7 @@ class ClientTest extends \Base
->method('ldap_bind')
->will($this->returnValue(false));
$this->setExpectedException('\Kanboard\Core\Ldap\ClientException');
$this->expectException('\Kanboard\Core\Ldap\ClientException');
$ldap = new Client;
$ldap->useAnonymousAuthentication();
@@ -228,7 +228,7 @@ class ClientTest extends \Base
)
->will($this->returnValue(false));
$this->setExpectedException('\Kanboard\Core\Ldap\ClientException');
$this->expectException('\Kanboard\Core\Ldap\ClientException');
$ldap = new Client;
$ldap->open('my_ldap_server');

View File

@@ -151,7 +151,7 @@ class LdapGroupTest extends Base
public function testGetBaseDnNotConfigured()
{
$this->setExpectedException('\LogicException');
$this->expectException('\LogicException');
$group = new Group($this->query);
$group->getBasDn();

View File

@@ -787,7 +787,7 @@ class LdapUserTest extends Base
public function testGetBaseDnNotConfigured()
{
$this->setExpectedException('\LogicException');
$this->expectException('\LogicException');
$user = new User($this->query);
$user->getBasDn();
@@ -795,7 +795,7 @@ class LdapUserTest extends Base
public function testGetLdapUserPatternNotConfigured()
{
$this->setExpectedException('\LogicException');
$this->expectException('\LogicException');
$user = new User($this->query);
$user->getLdapUserPattern('test');

View File

@@ -22,14 +22,14 @@ class AuthenticationManagerTest extends Base
public function testGetProviderNotFound()
{
$authManager = new AuthenticationManager($this->container);
$this->setExpectedException('LogicException');
$this->expectException('LogicException');
$authManager->getProvider('Dababase');
}
public function testGetPostProviderNotFound()
{
$authManager = new AuthenticationManager($this->container);
$this->setExpectedException('LogicException');
$this->expectException('LogicException');
$authManager->getPostAuthenticationProvider();
}