File fixup-unit-tests-broken-in-php8.patch of Package php-memcached

--- tests/bad_construct.phpt	2019-12-03 23:13:53.000000000 +0100
+++ tests/bad_construct.phpt	2021-01-20 15:36:41.953734804 +0100
@@ -1,7 +1,10 @@
 --TEST--
 Memcached construct with bad arguments
 --SKIPIF--
-<?php include "skipif.inc";?>
+<?php
+include "skipif.inc";
+if (version_compare(PHP_VERSION, '8.0', '>=')) die ("skip test throws exception in PHP-8");
+?>
 --FILE--
 <?php 
 
--- tests/undefined_set.phpt	2019-12-03 23:13:53.000000000 +0100
+++ tests/undefined_set.phpt	2021-01-20 15:37:03.713983686 +0100
@@ -1,7 +1,10 @@
 --TEST--
 Set with undefined key and value
 --SKIPIF--
-<?php include "skipif.inc";?>
+<?php
+include "skipif.inc";
+if (version_compare(PHP_VERSION, '8.0', '>=')) die ("skip test throws exception in PHP-8");
+?>
 --FILE--
 <?php
 include dirname (__FILE__) . '/config.inc';
--- tests/vbucket.phpt	2019-12-03 23:13:53.000000000 +0100
+++ tests/vbucket.phpt	2021-01-20 15:20:04.902391347 +0100
@@ -18,14 +18,6 @@ var_dump ($m->setBucket (array (1,2,2),
 
 var_dump ($m->setBucket (array ('a', 'b', 'c'), null, 2));
 
-var_dump ($m->setBucket (array (), null, 2));
-
-var_dump ($m->setBucket (array (), array (), -1));
-
-var_dump ($m->setBucket (null, array (), -1));
-
-var_dump ($m->setBucket (array (-1), array (-1), 1));
-
 echo "OK\n";
 
 ?>
@@ -33,16 +25,4 @@ echo "OK\n";
 bool(true)
 bool(true)
 bool(true)
-
-Warning: Memcached::setBucket(): server map cannot be empty in %s on line %d
-bool(false)
-
-Warning: Memcached::setBucket(): server map cannot be empty in %s on line %d
-bool(false)
-
-Warning: Memcached::setBucket() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: Memcached::setBucket(): the map must contain positive integers in %s on line %d
-bool(false)
 OK
openSUSE Build Service is sponsored by