mirror of
https://github.com/predis/predis.git
synced 2026-09-04 14:56:47 +00:00
fix test for ArgumentCountError exception with PHP 7.1
This commit is contained in:
committed by
Daniele Alessandri
parent
0b3af06e6b
commit
ce2cbfd929
@@ -64,10 +64,29 @@ class RawCommandTest extends PredisTestCase
|
||||
* argument is missing, PHP emits an E_WARNING.
|
||||
*
|
||||
* @group disconnected
|
||||
* @expectedException \PHPUnit_Framework_Error_Warning
|
||||
*/
|
||||
public function testPHPWarningOnMissingCommandIDWithStaticCreate()
|
||||
{
|
||||
if (version_compare(PHP_VERSION, "7.1", '>')) {
|
||||
$this->markTestSkipped('only for PHP < 7.1');
|
||||
}
|
||||
$this->setExpectedException('PHPUnit_Framework_Error_Warning');
|
||||
RawCommand::create();
|
||||
}
|
||||
|
||||
/**
|
||||
* The signature of RawCommand::create() requires one argument which is the
|
||||
* ID of the command (other arguments are fetched dinamically). If the first
|
||||
* argument is missing, PHP 7.1 throw an exception
|
||||
*
|
||||
* @group disconnected
|
||||
*/
|
||||
public function testPHPWarningOnMissingCommandIDWithStaticCreate71()
|
||||
{
|
||||
if (version_compare(PHP_VERSION, "7.1", '<')) {
|
||||
$this->markTestSkipped('only for PHP > 7.1');
|
||||
}
|
||||
$this->setExpectedException('ArgumentCountError');
|
||||
RawCommand::create();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user