summaryrefslogtreecommitdiffstats
path: root/event-upstream.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-04-23 11:38:44 +0200
committerRemi Collet <remi@remirepo.net>2018-04-23 11:38:44 +0200
commit1d4c69a670b19c6bd5e0a7a2054b134ef59165cc (patch)
treeb1bf95343d0860ac5579c30c34d409374b3c3df7 /event-upstream.patch
parent60947b59cbbbdaf3f879debd3309011cf78ce65f (diff)
more tests
Diffstat (limited to 'event-upstream.patch')
-rw-r--r--event-upstream.patch54
1 files changed, 54 insertions, 0 deletions
diff --git a/event-upstream.patch b/event-upstream.patch
index cf3d8a8..396011c 100644
--- a/event-upstream.patch
+++ b/event-upstream.patch
@@ -51,3 +51,57 @@ index d5945df..e37b2b1 100644
--
2.10.5
+From 0ea49e828fac05f17f258f525420ed807bd81716 Mon Sep 17 00:00:00 2001
+From: Ruslan Osmanov <rrosmanov@gmail.com>
+Date: Mon, 23 Apr 2018 16:01:40 +0700
+Subject: [PATCH] Fixed build errors in PHP 5.4
+
+---
+ tests/12-serialization.phpt | 16 ++++++++++++----
+ 1 file changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/tests/12-serialization.phpt b/tests/12-serialization.phpt
+index e37b2b1..82125a5 100644
+--- a/tests/12-serialization.phpt
++++ b/tests/12-serialization.phpt
+@@ -11,7 +11,6 @@ $eventHttpConnectionClass = EVENT_NS . '\\EventHttpConnection';
+ $eventBaseClass = EVENT_NS . '\\EventBase';
+ $eventHttpRequestClass = EVENT_NS . '\\EventHttpRequest';
+ $eventSslContextClass = EVENT_NS . '\\EventSslContext';
+-$eventExceptionClass = EVENT_NS . '\\EventException';
+
+ $base = new $eventBaseClass();
+ $listener = new $eventListenerClass($base, function () { }, null, 0, -1, '0.0.0.0:12345');
+@@ -38,17 +37,26 @@ echo "1 - ok\n";
+
+ /////////////////////////////////////////////
+
+-foreach ([ $base, $http, $http_request, $http_connection, $config, $listener ] as $object) {
++function testSerializeEventObject($object) {
++ $eventExceptionClass = EVENT_NS . '\\EventException';
++
+ try {
+ serialize($object);
+ } catch (\Exception $e) {
+ echo get_class($object), ' - ',
+ ($e instanceof $eventExceptionClass ? 'ok' : 'error - ' . get_class($e)),
+ "\n";
+- } finally {
+- $object = null;
+ }
+ }
++
++testSerializeEventObject($base);
++testSerializeEventObject($http);
++testSerializeEventObject($http_request);
++testSerializeEventObject($http_connection);
++testSerializeEventObject($config);
++testSerializeEventObject($listener);
++
++
+ ?>
+ --EXPECTF--
+ 1 - ok
+--
+2.10.5
+