git://git.onelab.eu
/
plcapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ed70fcf
)
2nd attempt at fixing tests
author
gggeek
<giunta.gaetano@gmail.com>
Sat, 20 Jan 2018 14:35:11 +0000
(14:35 +0000)
committer
gggeek
<giunta.gaetano@gmail.com>
Sat, 20 Jan 2018 14:35:11 +0000
(14:35 +0000)
tests/1ParsingBugsTest.php
patch
|
blob
|
history
diff --git
a/tests/1ParsingBugsTest.php
b/tests/1ParsingBugsTest.php
index
e7f56db
..
1e4b040
100644
(file)
--- a/
tests/1ParsingBugsTest.php
+++ b/
tests/1ParsingBugsTest.php
@@
-614,13
+614,12
@@
and there they were.</value></member><member><name>postid</name><value>7414222</
{
$v1 = new xmlrpcval(array(new xmlrpcval('one'), new xmlrpcval('two')), 'array');
$this->assertequals(1, count($v1));
{
$v1 = new xmlrpcval(array(new xmlrpcval('one'), new xmlrpcval('two')), 'array');
$this->assertequals(1, count($v1));
- $out = array(
array('key' => 'me', 'value' => array()), array('key' => 'mytype', 'value' => 2), array('key' => '_php_class', 'value' => null)
);
+ $out = array(
'me' => array(), 'mytype' => 2, '_php_class' => null
);
- $i = 0;
foreach($v1 as $key => $val)
{
foreach($v1 as $key => $val)
{
- $
expected = $out[$i]
;
- $
this->assertequals($expected['key'], $key)
;
+ $
this->assertContains($key, $out)
;
+ $
expected = $out[$key]
;
if (gettype($expected['value']) == 'array') {
$this->assertequals('array', gettype($val));
} else {
if (gettype($expected['value']) == 'array') {
$this->assertequals('array', gettype($val));
} else {