From d80e70e2b1421b84c7e8adb3032034fdc00c5903 Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Thu, 3 May 2018 16:13:25 -0500 Subject: [PATCH] Fix Unit type conversions in tests --- tests/TestCase.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/TestCase.php b/tests/TestCase.php index c911b753..397c713b 100755 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -116,11 +116,11 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase * @param array $data * @return array */ - protected function transformData($data) + protected function transformData(&$data) { - foreach($data as $key => $value) { - if(is_object($value)) { - $value = $this->transformData($value); + foreach($data as $key => &$value) { + if(is_array($value)) { + $this->transformData($value); } if (is_subclass_of($value, App\Interfaces\Unit::class)) {