From: gggeek Date: Sat, 20 Jan 2018 14:35:11 +0000 (+0000) Subject: 2nd attempt at fixing tests X-Git-Tag: 4.3.1~3 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=4b118966e1e19c8c660fd9ce4c462d910402996c;p=plcapi.git 2nd attempt at fixing tests --- diff --git a/tests/1ParsingBugsTest.php b/tests/1ParsingBugsTest.php index e7f56db4..1e4b0401 100644 --- a/tests/1ParsingBugsTest.php +++ b/tests/1ParsingBugsTest.php @@ -614,13 +614,12 @@ and there they were.postid7414222assertequals(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) { - $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 {