summaryrefslogtreecommitdiffstats
path: root/10.patch
blob: d33e5a4455b0fa7fecf269915245ca1ffea3595b (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
From e1eadcf2e44cecbf2816290f1d4edb0a74767028 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Sun, 25 Jun 2017 06:52:52 +0200
Subject: [PATCH] Fix test suite for php 7.2

---
 package.xml             |  1 +
 tests/autoload_001.phpt | 18 ++++++++++--------
 tests/autoload_002.phpt | 17 +++++++++++++++++
 3 files changed, 28 insertions(+), 8 deletions(-)
 create mode 100644 tests/autoload_002.phpt

diff --git a/tests/autoload_001.phpt b/tests/autoload_001.phpt
index 96ef592..eeaa20a 100644
--- a/tests/autoload_001.phpt
+++ b/tests/autoload_001.phpt
@@ -1,5 +1,7 @@
 --TEST--
 __autoload() is functional
+--SKIPIF--
+<?php if (PHP_VERSION_ID >= 70200) die("skip PHP < 7.2 only"); ?>
 --FILE--
 <?php
 
diff --git a/tests/autoload_002.phpt b/tests/autoload_002.phpt
new file mode 100644
index 0000000..cf9a16a
--- /dev/null
+++ b/tests/autoload_002.phpt
@@ -0,0 +1,17 @@
+--TEST--
+spl_autoload() is functional
+--FILE--
+<?php
+
+function my_autoload($sym)
+{
+var_dump($sym);
+}
+spl_autoload_register('my_autoload');
+class_exists('undefined');
+
+?>
+===DONE===
+--EXPECTF--
+string(9) "undefined"
+===DONE===