From 4b118966e1e19c8c660fd9ce4c462d910402996c Mon Sep 17 00:00:00 2001 From: gggeek Date: Sat, 20 Jan 2018 14:35:11 +0000 Subject: [PATCH] 2nd attempt at fixing tests --- tests/1ParsingBugsTest.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/1ParsingBugsTest.php b/tests/1ParsingBugsTest.php index e7f56db..1e4b040 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 { -- 2.43.0