Fix Unit type conversions in tests
This commit is contained in:
@@ -116,11 +116,11 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
|
|||||||
* @param array $data
|
* @param array $data
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
protected function transformData($data)
|
protected function transformData(&$data)
|
||||||
{
|
{
|
||||||
foreach($data as $key => $value) {
|
foreach($data as $key => &$value) {
|
||||||
if(is_object($value)) {
|
if(is_array($value)) {
|
||||||
$value = $this->transformData($value);
|
$this->transformData($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_subclass_of($value, App\Interfaces\Unit::class)) {
|
if (is_subclass_of($value, App\Interfaces\Unit::class)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user