@@ -79,12 +79,14 @@ public function testCheckExistIndexByValue(): void
7979
8080 public function testFindValueByKey (): void
8181 {
82- self ::assertIsArray (Arrays::findValueByKey ($ this ->fruitArray , 'fruta_2 ' ));
82+ $ result = Arrays::findValueByKey ($ this ->fruitArray , 'fruta_2 ' );
83+ self ::assertNotEmpty ($ result );
8384 }
8485
8586 public function testFindIndexByValue (): void
8687 {
87- self ::assertIsArray (Arrays::findIndexByValue ($ this ->fruitArray , self ::VEGETABLE_RUCULA ));
88+ $ result = Arrays::findIndexByValue ($ this ->fruitArray , self ::VEGETABLE_RUCULA );
89+ self ::assertNotEmpty ($ result );
8890 }
8991
9092 public function testConvertArrayToXml (): void
@@ -114,7 +116,6 @@ public function testConvertJsonIndexToArray(): void
114116
115117 Arrays::convertJsonIndexToArray ($ array );
116118
117- self ::assertIsArray ($ array );
118119 self ::assertIsArray ($ array ['verduras ' ]);
119120 self ::assertSame (self ::VEGETABLE_RUCULA , $ array ['verduras ' ]['verdura_1 ' ]);
120121 }
@@ -255,7 +256,10 @@ public function testConvertJsonIndexToArrayNestedJson(): void
255256 ],
256257 ];
257258 Arrays::convertJsonIndexToArray ($ array );
258- self ::assertIsArray ($ array ['nivel1 ' ]['dados ' ]);
259- self ::assertSame ('valor ' , $ array ['nivel1 ' ]['dados ' ]['chave ' ]);
259+ $ nivel1 = $ array ['nivel1 ' ];
260+ self ::assertIsArray ($ nivel1 );
261+ $ dados = $ nivel1 ['dados ' ];
262+ self ::assertIsArray ($ dados );
263+ self ::assertSame ('valor ' , $ dados ['chave ' ]);
260264 }
261265}
0 commit comments