mirror of
https://github.com/php-win-ext/php-memcached.git
synced 2026-03-24 09:02:10 +01:00
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.
28 lines
584 B
PHP
28 lines
584 B
PHP
--TEST--
|
|
Memcached::replaceByKey()
|
|
--SKIPIF--
|
|
<?php include "skipif.inc";?>
|
|
--FILE--
|
|
<?php
|
|
include dirname(__FILE__) . '/config.inc';
|
|
$m = memc_get_instance ();
|
|
error_reporting(0);
|
|
|
|
$m->delete('foo');
|
|
var_dump($m->replaceByKey('kef', 'foo', 'bar', 60));
|
|
echo error_get_last()["message"], "\n";
|
|
echo $m->getResultMessage(), "\n";
|
|
var_dump($m->getByKey('kef', 'foo'));
|
|
|
|
$m->setByKey('kef', 'foo', 'kef');
|
|
var_dump($m->replaceByKey('kef', 'foo', 'bar', 60));
|
|
var_dump($m->getByKey('kef', 'foo'));
|
|
|
|
--EXPECTF--
|
|
bool(false)
|
|
|
|
%rNOT STORED|NOT FOUND%r
|
|
bool(false)
|
|
bool(true)
|
|
string(3) "bar"
|