Permalink
Browse files

Fixed tests after chanage to php_memc_do_serverlist_callback()

The php function getServerList() no longer returns a weight value. The tests have been updated to reflect this change.

The need for this change is result of commenting out "add_assoc_long(array, "weight", instance->weight);" in php_memcached.c
  • Loading branch information...
Mitch Hagstrand
Mitch Hagstrand committed Jan 11, 2013
1 parent 8230dc1 commit 3c7aa2596f5de91f74ab096f9eb2da9af91134b8
Showing with 6 additions and 18 deletions.
  1. +1 −3 tests/bug_16084.phpt
  2. +4 −12 tests/getserverlist.phpt
  3. +1 −3 tests/invoke_callback.phpt
View
@@ -13,12 +13,10 @@ var_dump($m->getServerList());
bool(true)
array(1) {
[0]=>
- array(3) {
+ array(2) {
["host"]=>
string(9) "localhost"
["port"]=>
int(11211)
- ["weight"]=>
- int(3)
}
}
View
@@ -20,43 +20,35 @@ array(0) {
}
array(1) {
[0]=>
- array(3) {
+ array(2) {
["host"]=>
string(9) "localhost"
["port"]=>
int(11211)
- ["weight"]=>
- int(3)
}
}
array(2) {
[0]=>
- array(3) {
+ array(2) {
["host"]=>
string(9) "localhost"
["port"]=>
int(11211)
- ["weight"]=>
- int(3)
}
[1]=>
- array(3) {
+ array(2) {
["host"]=>
string(9) "localhost"
["port"]=>
int(11211)
- ["weight"]=>
- int(3)
}
}
array(1) {
[0]=>
- array(3) {
+ array(2) {
["host"]=>
string(9) "127.0.0.1"
["port"]=>
int(11211)
- ["weight"]=>
- int(%r[01]%r)
}
}
@@ -19,13 +19,11 @@ echo "OK\n";
--EXPECTF--
array(1) {
[0]=>
- array(3) {
+ array(2) {
["host"]=>
string(9) "127.0.0.1"
["port"]=>
int(11211)
- ["weight"]=>
- int(%r[01]%r)
}
}
OK

0 comments on commit 3c7aa25

Please sign in to comment.