57 Commits

Author SHA1 Message Date
Pavel Djundik
7348cc11f7 Move working tests up a folder (#503)
Tests in the experimental/ folder were not executed on CI. The ones that work move up, the few
that remain in experimental/ need further investigation to get working or remove.
2023-04-27 08:35:07 -07:00
Timo Tijhof
6d457155fb Remove "failed to set key" warning from setMulti (#490)
This was introduced in https://github.com/php-memcached-dev/php-memcached/commit/6837d89494,
pull https://github.com/php-memcached-dev/php-memcached/pull/214. I suspect it
may have been a left-over from debugging something. The test was later
changed in 6837d89494 to expect the warning in question, although other
similar tests don't encounter such warning currently.

It appears no other Memcached methods emit a PHP Warning when they encounter
a write read or failure. Instead, they typically turn their return value
into boolean false, and provide details via getResultMessage().

The introduction of this warning since php-memcached 3.0 has led to a number
of confused consumers (locally #260, #409, #450, and more reports
within downstream issue trackers).

Closes https://github.com/php-memcached-dev/php-memcached/issues/409.
2021-08-22 21:56:19 -07:00
Aaron Stone
43bbf00802 In PHP 7.2, php_errormsg is deprecated 2017-07-07 19:15:28 -07:00
Xinchen Hui
4fa21116f1 Value pass to callback behavior consistently with get
(GET_EXTENED return array)
2016-07-26 19:11:54 +08:00
Xinchen Hui
41b005fd0f Fixed test 2016-07-26 17:48:00 +08:00
Xinchen Hui
6837d89494 Fixed test (tests/experimental/setmulti_badserialize.phpt) 2016-07-23 20:44:03 +08:00
Xinchen Hui
513c091a67 Fixed locale_float.phpt test 2016-07-23 20:13:47 +08:00
Xinchen Hui
95f26c4f75 Fixed warning in run-test.php and also fixed test 2016-07-23 12:39:49 +08:00
Xinchen Hui
0e517902d6 Improved the tests 2016-07-21 18:59:01 +08:00
Joe Watkins
3a8c8fd7a0 disable stuff not available for 7 yet 2015-09-01 18:30:46 +01:00
Joe Watkins
a335533ec8 another test expecting the wrong thing, it seems 2015-08-31 19:08:15 +01:00
Joe Watkins
2af8314b36 moar tests passing 2015-08-31 17:47:08 +01:00
Vincent Bernat
43460341a2 Revert "Move tests using serialized objects and compression out of experimental"
This reverts commit 391d0c14eb.

Conflicts:
	package.xml
2014-01-16 09:19:18 +01:00
Vincent Bernat
77a217a21d Move getserverbykey test out of experimental 2014-01-09 16:36:03 +01:00
Vincent Bernat
82227e5084 getServerByKey cannot report weight anymore
Due to a change in libmemcached (exposed in
5450f45a3e), `getServerByKey` is not able
any more to report a server weight. It reports 0 instead. This makes the
test on this function fails. We fix this by expecting a weight of 0
instead of a weight of 1.
2014-01-09 16:35:24 +01:00
Mikko Koppanen
03d224485b Merge pull request #119 from vincentbernat/fix/compress-serialized
Fix compression of serialized objects.
2014-01-09 07:30:14 -08:00
Vincent Bernat
391d0c14eb Move tests using serialized objects and compression out of experimental 2014-01-09 16:28:05 +01:00
Vincent Bernat
50651d5884 Make output of use_sasl entry in moduleinfo test optional
When SASL support is compiled out, this entry is absent. Nonetheless,
test should succeed in a such case.
2014-01-08 11:53:35 +01:00
Vincent Bernat
a8a837d7f1 Add sess_lock_* and store_retry_count entries to moduleinfo test
Those entries have been added recently but the test was not updated.
2014-01-08 11:49:48 +01:00
Mikko
c699b3eee3 More tests 2013-11-19 18:17:02 +08:00
Mikko
5a31bd1623 copy some tests from experimental to tests. Fix cache read-through callbacks 2013-11-19 17:39:53 +08:00
Mikko
aef9135914 Fixed UDP server adding with newer libmemcached, closes #54 2013-10-18 14:49:49 +08:00
Mikko
9812556e7a Fixed broken tests, fixed build against different libmemcached versions (hopefully) and misc error fixes 2013-10-18 03:10:22 +08:00
Mitch Hagstrand
7e3bc8b0ee Removed memcached.sess_consistent_hashing option.
1. Removed memcached.sess_consistent_hashing which is a lesser version  of memcached.sess_consistent_hash
2. Added default value for memcached.sess_consistent_hash
2013-01-14 00:40:49 -08:00
Ilia Alshanetsky
40ce9b4633 Merge branch 'master' of https://github.com/Vendini/php-memcached into Vendini-master
Conflicts:
	memcached.ini
	php_memcached.c
	php_memcached.h
	php_memcached_session.c
2012-11-10 10:21:47 -05:00
Andrei Zmievski
41fbaace23 Fix some tests. 2012-03-02 14:48:51 -05:00
Ilia Alshanetsky
f932b94c73 Test fixes 2011-06-11 11:27:05 -04:00
Ilia Alshanetsky
897d1cf26b Added support for incremenet/decrement ByKey
Added support for initial value initialization by increment/decrement (requires binary protocol)
2011-06-11 10:53:16 -04:00
Ilia Alshanetsky
c0f0193705 Fixed test 2011-06-11 10:52:18 -04:00
Teddy Grenman
b0f5bff753 Allow use of UDP, highly experimental.
Only tested with addServer and only if the UDP behavior is set before
adding any servers. Libmemcached 0.49 does not support mixing TCP and
UDP per client instance.
2011-05-04 15:22:43 +03:00
Teddy Grenman
17853a39e8 Cleanup, add pecl bug #17137 (prefix change) test 2011-05-03 15:46:02 +03:00
Teddy Grenman
e60e02eaf9 Test cleanup. 2011-05-03 00:37:09 +03:00
Teddy Grenman
de487fffa8 Tweak test, skip instead of FAIL. 2011-05-03 00:18:54 +03:00
Teddy Grenman
55628f22b1 New float tests: "ignore locale" and large/small. 2011-05-02 23:57:02 +03:00
Teddy Grenman
895515a968 Fix tests. 2011-05-02 23:55:12 +03:00
Mikko Koppanen
d0d9463e8f session support check 2010-11-03 22:11:59 +00:00
Mikko Koppanen
5d230a4248 session support check 2010-11-03 22:11:10 +00:00
Mikko Koppanen
699630e808 Fixed tests. with multiple servers the key order might be different. getMulti partial error does not come through from libmemcached (?) 2010-02-03 22:37:39 +00:00
Teddy Grenman
c76bb8f39d Moving forward. 2010-02-03 20:40:17 +02:00
Teddy Grenman
447edabf09 Work in progress
Modified setMulti to convert non-string keys to strings.
The implementation is a bit hackish but works. getMulti
is still undone.
2010-02-03 20:40:16 +02:00
Teddy Grenman
ae804976ad Merge branch 'master' of git://github.com/mkoppanen/php-memcached into devel 2010-02-03 16:16:27 +02:00
Mikko Koppanen
c22764620b Fixed rest of the tests to reflect the current situation 2010-02-03 14:14:25 +00:00
Mikko Koppanen
c28acada51 Fixed a test, some versions give back WRITE FAILURE 2010-02-03 13:32:59 +00:00
Mikko Koppanen
b4a1332ed1 Fixes the incorrect timeout constant 2010-02-03 12:15:23 +00:00
Teddy Grenman
33cf48aeb0 Fix pecl [bug#17000], allow integer keys in setMulti.
And associated test. There is some type juggling due to
the fact that PHP array indexes are ulong and whereas
php integers are signed. TODO: similar changes to getMulti
and deleteMulti.
2010-01-02 23:13:16 +02:00
Teddy Grenman
f236e9baa2 Fix test for 5.3 2009-12-31 14:53:51 +02:00
Teddy Grenman
1303ea92b5 Minor test fixes when using igbinary. 2009-12-29 12:45:55 +02:00
Teddy Grenman
abd0cae8de Add INI option to set the default serializer.
Added new and updated tests to match ini setting change.
2009-12-29 11:12:30 +02:00
Teddy Grenman
39d0beed1c Fix [github issue#7] expiration via session gc_maxlifetime.
INI lookup used ZEND_STRL which does not include the terminating
null. Changed code to use PS(gc_maxlifetime) instead. Also changed
getting of max_execution_time to use ZEND_STRS.
2009-12-28 11:20:02 +02:00
Teddy Grenman
f9f40bf08d Add change of expiration time in cache callback.
Preliminary support for changing of the item expiration
in the cache callback. Function signture is now:
 user_info_cb($memc, $key, &$value[, &$expiration = 0])
2009-12-14 16:39:36 +02:00