Skip to content

Commit 944a16d

Browse files
committedNov 17, 2016
Merge remote-tracking branch 'github/pr/393' into v1.1
2 parents 6ab10b2 + d1290df commit 944a16d

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed
 

‎.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ php:
66
- 5.5
77
- 5.6
88
- 7.0
9+
- 7.1
910
- hhvm
1011
branches:
1112
except:

‎tests/Predis/Command/RawCommandTest.php

+20-1
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,29 @@ public function testExceptionOnMissingCommandID()
7474
* argument is missing, PHP emits an E_WARNING.
7575
*
7676
* @group disconnected
77-
* @expectedException \PHPUnit_Framework_Error_Warning
7877
*/
7978
public function testPHPWarningOnMissingCommandIDWithStaticCreate()
8079
{
80+
if (version_compare(PHP_VERSION, "7.1", '>')) {
81+
$this->markTestSkipped('only for PHP < 7.1');
82+
}
83+
$this->setExpectedException('PHPUnit_Framework_Error_Warning');
84+
RawCommand::create();
85+
}
86+
87+
/**
88+
* The signature of RawCommand::create() requires one argument which is the
89+
* ID of the command (other arguments are fetched dinamically). If the first
90+
* argument is missing, PHP 7.1 throw an exception
91+
*
92+
* @group disconnected
93+
*/
94+
public function testPHPWarningOnMissingCommandIDWithStaticCreate71()
95+
{
96+
if (version_compare(PHP_VERSION, "7.1", '<')) {
97+
$this->markTestSkipped('only for PHP > 7.1');
98+
}
99+
$this->setExpectedException('ArgumentCountError');
81100
RawCommand::create();
82101
}
83102

0 commit comments

Comments
 (0)
Please sign in to comment.