mirror of
https://github.com/php-win-ext/pecl-memcache.git
synced 2026-03-24 00:52:07 +01:00
fix SKIPIF sections
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache_set() function
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("memcache")) print "skip"; ?>
|
||||
<?php include 'connect.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache_get() function
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("memcache")) print "skip"; ?>
|
||||
<?php include 'connect.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache_set()/memcache_get() using compression
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("memcache")) print "skip"; ?>
|
||||
<?php include 'connect.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache_add() & memcache_replace()
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("memcache")) print "skip"; ?>
|
||||
<?php include 'connect.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache_set() & memcache_get() with strange keys
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("memcache")) print "skip"; ?>
|
||||
<?php include 'connect.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache_increment() & memcache_decrement()
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("memcache")) print "skip"; ?>
|
||||
<?php include 'connect.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache_get_version() & memcache_get_stats()
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("memcache")) print "skip"; ?>
|
||||
<?php include 'connect.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache_delete()
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("memcache")) print "skip"; ?>
|
||||
<?php include 'connect.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache->set() method
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("memcache")) print "skip"; ?>
|
||||
<?php include 'connect.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache->get() function
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("memcache")) print "skip"; ?>
|
||||
<?php include 'connect.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache->set()/memcache->get() using compression
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("memcache")) print "skip"; ?>
|
||||
<?php include 'connect.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache_add() & memcache_replace()
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("memcache")) print "skip"; ?>
|
||||
<?php include 'connect.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache->set() & memcache->get() with strange keys
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("memcache")) print "skip"; ?>
|
||||
<?php include 'connect.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache->increment() & memcache->decrement()
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("memcache")) print "skip"; ?>
|
||||
<?php include 'connect.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache->getVersion() & memcache->getStats()
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("memcache")) print "skip"; ?>
|
||||
<?php include 'connect.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache->delete()
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("memcache")) print "skip"; ?>
|
||||
<?php include 'connect.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
Memcache class should be inheritable
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("memcache")) print "skip"; ?>
|
||||
<?php include 'connect.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache_set() & memcache_add()
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("memcache")) print "skip"; ?>
|
||||
<?php include 'connect.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache->addServer()
|
||||
--SKIPIF--
|
||||
<?php include 'connect.inc'; if(!extension_loaded("memcache") || !isset($host2)) print "skip"; ?>
|
||||
<?php include 'connect.inc'; if (!isset($host2)) die('skip $host2 not set'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
--TEST--
|
||||
memcache_add_server()
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("memcache")) die ("skip");
|
||||
include 'connect.inc';
|
||||
if (!isset($host2)) die("skip");
|
||||
?>
|
||||
<?php include 'connect.inc'; if (!isset($host2)) die('skip $host2 not set'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache->set()/memcache->get() with multiple keys and load balancing
|
||||
--SKIPIF--
|
||||
<?php include 'connect.inc'; if(!extension_loaded("memcache") || !isset($host2)) print "skip"; ?>
|
||||
<?php include 'connect.inc'; if (!isset($host2)) die('skip $host2 not set'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -48,4 +48,4 @@ array(2) {
|
||||
bool(false)
|
||||
string(5) "test2"
|
||||
string(5) "test1"
|
||||
bool(false)
|
||||
bool(false)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache->set()/memcache->get() with failover
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("memcache")) print "skip"; ?>
|
||||
<?php include 'connect.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -45,4 +45,4 @@ array(2) {
|
||||
string(5) "test2"
|
||||
}
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache->getExtendedStats()
|
||||
--SKIPIF--
|
||||
<?php include 'connect.inc'; if(!extension_loaded("memcache") || !isset($host2)) print "skip"; ?>
|
||||
<?php include 'connect.inc'; if (!isset($host2)) die('skip $host2 not set'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -28,4 +28,4 @@ int(19)
|
||||
int(3)
|
||||
int(19)
|
||||
int(19)
|
||||
bool(false)
|
||||
bool(false)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache_get_extended_stats()
|
||||
--SKIPIF--
|
||||
<?php include 'connect.inc'; if(!extension_loaded("memcache") || !isset($host2)) print "skip"; ?>
|
||||
<?php include 'connect.inc'; if (!isset($host2)) die('skip $host2 not set'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache->delete() with load balancing
|
||||
--SKIPIF--
|
||||
<?php include 'connect.inc'; if(!extension_loaded("memcache") || !isset($host2)) print "skip"; ?>
|
||||
<?php include 'connect.inc'; if (!isset($host2)) die('skip $host2 not set'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -68,4 +68,4 @@ bool(false)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache->close(), memcache->get()
|
||||
--SKIPIF--
|
||||
<?php include 'connect.inc'; if(!extension_loaded("memcache") || !isset($host2)) print "skip"; ?>
|
||||
<?php include 'connect.inc'; if (!isset($host2)) die('skip $host2 not set'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -32,4 +32,4 @@ bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
string(4) "test"
|
||||
string(4) "test"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache_close(), memcache_get()
|
||||
--SKIPIF--
|
||||
<?php include 'connect.inc'; if(!extension_loaded("memcache") || !isset($host2)) print "skip"; ?>
|
||||
<?php include 'connect.inc'; if (!isset($host2)) die('skip $host2 not set'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache->increment() with load balancing
|
||||
--SKIPIF--
|
||||
<?php include 'connect.inc'; if(!extension_loaded("memcache") || !isset($host2)) print "skip"; ?>
|
||||
<?php include 'connect.inc'; if (!isset($host2)) die('skip $host2 not set'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -46,4 +46,4 @@ int(21)
|
||||
bool(false)
|
||||
string(2) "21"
|
||||
string(2) "11"
|
||||
bool(false)
|
||||
bool(false)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache->delete() with load balancing
|
||||
--SKIPIF--
|
||||
<?php include 'connect.inc'; if(!extension_loaded("memcache") || !isset($host2)) print "skip"; ?>
|
||||
<?php include 'connect.inc'; if (!isset($host2)) die('skip $host2 not set'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -29,4 +29,4 @@ var_dump($result4);
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache->setCompressThreshold()
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("memcache")) print "skip"; ?>
|
||||
<?php include 'connect.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -37,4 +37,4 @@ int(15000)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
string(3) "abc"
|
||||
string(3) "abc"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache_set_compress_threshold()
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("memcache")) print "skip"; ?>
|
||||
<?php include 'connect.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache->addServer() and memcache->close()
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("memcache")) print "skip"; ?>
|
||||
<?php include 'connect.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
ini_set("memcache.allow_failover")
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("memcache")) print "skip"; ?>
|
||||
<?php include 'connect.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
ini_set("memcache.chunk_size")
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("memcache")) print "skip"; ?>
|
||||
<?php include 'connect.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache->flush()
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("memcache")) print "skip"; ?>
|
||||
<?php include 'connect.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -25,4 +25,4 @@ var_dump($result2);
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(false)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
memcache_flush()
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("memcache")) print "skip"; ?>
|
||||
<?php include 'connect.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
<?php
|
||||
|
||||
if (!extension_loaded("memcache")) {
|
||||
die("skip");
|
||||
}
|
||||
|
||||
/*
|
||||
* Please change host & port to match your configuration
|
||||
*/
|
||||
@@ -14,7 +18,7 @@ $port = 11211;
|
||||
$nonExistingHost = "localhost";
|
||||
$nonExistingPort = 11213;
|
||||
|
||||
$memcache = memcache_connect($host, $port);
|
||||
$memcache = @memcache_connect($host, $port);
|
||||
|
||||
if (!$memcache) {
|
||||
die('skip Connection to memcached failed');
|
||||
|
||||
Reference in New Issue
Block a user