blob: f52675c2fa59b4d3227592b447f4a1caa361dce4 (
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
|
From de6f3d43ad6a2a4f15b457c5db5ccd9439576de2 Mon Sep 17 00:00:00 2001
From: Shawn Iwinski <siwinski@redhat.com>
Date: Sat, 25 Feb 2017 11:15:45 -0500
Subject: [PATCH] Fix tests for PHP 7.1 negative string offsets (fixes #61)
---
tests/PHP/Shim/MbstringTest.php | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/PHP/Shim/MbstringTest.php b/tests/PHP/Shim/MbstringTest.php
index fe3cfbe..bdb1a7d 100644
--- a/tests/PHP/Shim/MbstringTest.php
+++ b/tests/PHP/Shim/MbstringTest.php
@@ -158,6 +158,10 @@ public function testmb_strpos_empty_delimiter()
*/
public function testmb_strpos_negative_offset()
{
+ if (version_compare(PHP_VERSION, '7.1', '>=')) {
+ $this->markTestSkipped('PHP >= 7.1 supports negative string offsets');
+ }
+
try {
mb_strpos('abc', 'a', -1);
$this->assertFalse(true, 'The previous line should trigger a warning (Offset not contained in string)');
|