[tests] Exlude persistent connections tests under PHP 5.3.

The get_resource_type() function does not differentiate between normal streams
and persistent streams, so we cannot really test this case.
This commit is contained in:
Daniele Alessandri
2015-07-25 21:49:18 +02:00
parent c7cae66a97
commit abf2ce0bd1
4 changed files with 20 additions and 48 deletions
@@ -484,6 +484,10 @@ abstract class PredisConnectionTestCase extends PredisTestCase
*/
protected function assertPersistentConnection(NodeConnectionInterface $connection)
{
if (version_compare(PHP_VERSION, '5.4.0') < 0 || $this->isHHVM()) {
$this->markTestSkipped('This test does not currently work on HHVM.');
}
$this->assertSame('persistent stream', get_resource_type($connection->getResource()));
}
@@ -497,6 +501,10 @@ abstract class PredisConnectionTestCase extends PredisTestCase
*/
protected function assertNonPersistentConnection(NodeConnectionInterface $connection)
{
if (version_compare(PHP_VERSION, '5.4.0') < 0 || $this->isHHVM()) {
$this->markTestSkipped('This test does not currently work on HHVM.');
}
$this->assertSame('stream', get_resource_type($connection->getResource()));
}