From de6f3d43ad6a2a4f15b457c5db5ccd9439576de2 Mon Sep 17 00:00:00 2001 From: Shawn Iwinski 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)');