Skip to content

Commit 3c7aa25

Browse files
author
Mitch Hagstrand
committed
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
1 parent 8230dc1 commit 3c7aa25

File tree

3 files changed

+6
-18
lines changed

3 files changed

+6
-18
lines changed

tests/bug_16084.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,10 @@ var_dump($m->getServerList());
1313
bool(true)
1414
array(1) {
1515
[0]=>
16-
array(3) {
16+
array(2) {
1717
["host"]=>
1818
string(9) "localhost"
1919
["port"]=>
2020
int(11211)
21-
["weight"]=>
22-
int(3)
2321
}
2422
}

tests/getserverlist.phpt

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,43 +20,35 @@ array(0) {
2020
}
2121
array(1) {
2222
[0]=>
23-
array(3) {
23+
array(2) {
2424
["host"]=>
2525
string(9) "localhost"
2626
["port"]=>
2727
int(11211)
28-
["weight"]=>
29-
int(3)
3028
}
3129
}
3230
array(2) {
3331
[0]=>
34-
array(3) {
32+
array(2) {
3533
["host"]=>
3634
string(9) "localhost"
3735
["port"]=>
3836
int(11211)
39-
["weight"]=>
40-
int(3)
4137
}
4238
[1]=>
43-
array(3) {
39+
array(2) {
4440
["host"]=>
4541
string(9) "localhost"
4642
["port"]=>
4743
int(11211)
48-
["weight"]=>
49-
int(3)
5044
}
5145
}
5246
array(1) {
5347
[0]=>
54-
array(3) {
48+
array(2) {
5549
["host"]=>
5650
string(9) "127.0.0.1"
5751
["port"]=>
5852
int(11211)
59-
["weight"]=>
60-
int(%r[01]%r)
6153
}
6254
}

tests/invoke_callback.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,11 @@ echo "OK\n";
1919
--EXPECTF--
2020
array(1) {
2121
[0]=>
22-
array(3) {
22+
array(2) {
2323
["host"]=>
2424
string(9) "127.0.0.1"
2525
["port"]=>
2626
int(11211)
27-
["weight"]=>
28-
int(%r[01]%r)
2927
}
3028
}
3129
OK

0 commit comments

Comments
 (0)