Kanboard now requires PHP >= 7.2 since other versions are deprecated
This commit is contained in:
@@ -20,13 +20,13 @@ class HostValidatorTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
$this->assertNull(HostValidator::validate(array('192.168.10.1/24'), '192.168.10.1'),'test ip match');
|
||||
$this->assertNull(HostValidator::validate(array('192.168.10.1/24'), '192.168.10.250'),'test ip match');
|
||||
$this->setExpectedException('\JsonRPC\Exception\AccessDeniedException');
|
||||
$this->expectException('\JsonRPC\Exception\AccessDeniedException');
|
||||
HostValidator::validate(array('192.168.10.1/24'), '192.168.11.1');
|
||||
}
|
||||
|
||||
public function testWithNotAuthorizedHosts()
|
||||
{
|
||||
$this->setExpectedException('\JsonRPC\Exception\AccessDeniedException');
|
||||
$this->expectException('\JsonRPC\Exception\AccessDeniedException');
|
||||
HostValidator::validate(array('192.168.1.1'), '127.0.0.1', '127.0.0.1');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class JsonEncodingValidatorTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
json_encode("\xB1\x31");
|
||||
|
||||
$this->setExpectedException('\JsonRPC\Exception\ResponseEncodingFailureException');
|
||||
$this->expectException('\JsonRPC\Exception\ResponseEncodingFailureException');
|
||||
JsonEncodingValidator::validate();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ class JsonFormatValidatorTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
public function testJsonNotParsedCorrectly()
|
||||
{
|
||||
$this->setExpectedException('\JsonRPC\Exception\InvalidJsonFormatException');
|
||||
$this->expectException('\JsonRPC\Exception\InvalidJsonFormatException');
|
||||
JsonFormatValidator::validate('');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,31 +13,31 @@ class RpcFormatValidatorTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
public function testWithNoVersion()
|
||||
{
|
||||
$this->setExpectedException('\JsonRPC\Exception\InvalidJsonRpcFormatException');
|
||||
$this->expectException('\JsonRPC\Exception\InvalidJsonRpcFormatException');
|
||||
RpcFormatValidator::validate(array('method' => 'foobar'));
|
||||
}
|
||||
|
||||
public function testWithNoMethod()
|
||||
{
|
||||
$this->setExpectedException('\JsonRPC\Exception\InvalidJsonRpcFormatException');
|
||||
$this->expectException('\JsonRPC\Exception\InvalidJsonRpcFormatException');
|
||||
RpcFormatValidator::validate(array('jsonrpc' => '2.0'));
|
||||
}
|
||||
|
||||
public function testWithMethodNotString()
|
||||
{
|
||||
$this->setExpectedException('\JsonRPC\Exception\InvalidJsonRpcFormatException');
|
||||
$this->expectException('\JsonRPC\Exception\InvalidJsonRpcFormatException');
|
||||
RpcFormatValidator::validate(array('jsonrpc' => '2.0', 'method' => array()));
|
||||
}
|
||||
|
||||
public function testWithBadVersion()
|
||||
{
|
||||
$this->setExpectedException('\JsonRPC\Exception\InvalidJsonRpcFormatException');
|
||||
$this->expectException('\JsonRPC\Exception\InvalidJsonRpcFormatException');
|
||||
RpcFormatValidator::validate(array('jsonrpc' => '1.0', 'method' => 'abc'));
|
||||
}
|
||||
|
||||
public function testWithBadParams()
|
||||
{
|
||||
$this->setExpectedException('\JsonRPC\Exception\InvalidJsonRpcFormatException');
|
||||
$this->expectException('\JsonRPC\Exception\InvalidJsonRpcFormatException');
|
||||
RpcFormatValidator::validate(array('jsonrpc' => '2.0', 'method' => 'abc', 'params' => 'foobar'));
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class UserValidatorTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
public function testWithNotAuthorizedHosts()
|
||||
{
|
||||
$this->setExpectedException('\JsonRPC\Exception\AuthenticationFailureException');
|
||||
$this->expectException('\JsonRPC\Exception\AuthenticationFailureException');
|
||||
UserValidator::validate(array('user' => 'pass'), 'user', 'wrong password');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user