summaryrefslogtreecommitdiffstats
path: root/55.patch
blob: 4e8f03cbd3a9ad2ebcdc4843821a20ce114eeb10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
From 0bb83c7e86e37667a643d581c2260e6a94b7585d Mon Sep 17 00:00:00 2001
From: FlyingHail <flyinghail@msn.com>
Date: Mon, 12 Nov 2018 17:00:19 +0800
Subject: [PATCH] Fix: skip PSR-18 tests when PHP < 7

---
 tests/PsrHttpClientClientExceptionInterface.phpt  | 2 +-
 tests/PsrHttpClientClientInterface.phpt           | 2 +-
 tests/PsrHttpClientNetworkExceptionInterface.phpt | 2 +-
 tests/PsrHttpClientRequestExceptionInterface.phpt | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/PsrHttpClientClientExceptionInterface.phpt b/tests/PsrHttpClientClientExceptionInterface.phpt
index a02da4e..b270240 100644
--- a/tests/PsrHttpClientClientExceptionInterface.phpt
+++ b/tests/PsrHttpClientClientExceptionInterface.phpt
@@ -1,7 +1,7 @@
 --TEST--
 Psr\Http\Client\ClientExceptionInterface
 --SKIPIF--
-<?php if( !extension_loaded('psr') ) die('skip '); ?>
+<?php if( !extension_loaded('psr') || PHP_MAJOR_VERSION < 7 ) die('skip '); ?>
 --FILE--
 <?php
 use Psr\Http\Client\ClientExceptionInterface;
diff --git a/tests/PsrHttpClientClientInterface.phpt b/tests/PsrHttpClientClientInterface.phpt
index 6aebb2a..ae12835 100644
--- a/tests/PsrHttpClientClientInterface.phpt
+++ b/tests/PsrHttpClientClientInterface.phpt
@@ -1,7 +1,7 @@
 --TEST--
 Psr\Http\Client\ClientInterface
 --SKIPIF--
-<?php if( !extension_loaded('psr') ) die('skip '); ?>
+<?php if( !extension_loaded('psr') || PHP_MAJOR_VERSION < 7 ) die('skip '); ?>
 --FILE--
 <?php
 include __DIR__ . '/SampleMessage.inc';
diff --git a/tests/PsrHttpClientNetworkExceptionInterface.phpt b/tests/PsrHttpClientNetworkExceptionInterface.phpt
index 8ef9619..83803d2 100644
--- a/tests/PsrHttpClientNetworkExceptionInterface.phpt
+++ b/tests/PsrHttpClientNetworkExceptionInterface.phpt
@@ -1,7 +1,7 @@
 --TEST--
 Psr\Http\Client\NetworkExceptionInterface
 --SKIPIF--
-<?php if( !extension_loaded('psr') ) die('skip '); ?>
+<?php if( !extension_loaded('psr') || PHP_MAJOR_VERSION < 7 ) die('skip '); ?>
 --FILE--
 <?php
 use Psr\Http\Message\RequestInterface;
diff --git a/tests/PsrHttpClientRequestExceptionInterface.phpt b/tests/PsrHttpClientRequestExceptionInterface.phpt
index a522466..f643b89 100644
--- a/tests/PsrHttpClientRequestExceptionInterface.phpt
+++ b/tests/PsrHttpClientRequestExceptionInterface.phpt
@@ -1,7 +1,7 @@
 --TEST--
 Psr\Http\Client\RequestExceptionInterface
 --SKIPIF--
-<?php if( !extension_loaded('psr') ) die('skip '); ?>
+<?php if( !extension_loaded('psr') || PHP_MAJOR_VERSION < 7 ) die('skip '); ?>
 --FILE--
 <?php
 use Psr\Http\Message\RequestInterface;