diff --git a/tests/TestCase.php b/tests/TestCase.php
index c5ea0be2..7ac83834 100644
--- a/tests/TestCase.php
+++ b/tests/TestCase.php
@@ -173,10 +173,17 @@ class TestCase extends BaseTestCase
             return $this;
         });
 
-        Testable::macro('setArray', function ($attributes) {
+        Testable::macro('setArray', function ($attributes, $value = null) {
             $self = $this;
-            foreach ($attributes as $key => $value) {
-                $self = $this->set($key, $value);
+            if ($value === null) {
+                foreach ($attributes as $key => $value) {
+                    $self = $this->set($key, $value);
+                }
+                return $self;
+            }
+
+            foreach ($value as $key => $v) {
+                $self = $self->set($attributes . '.' . $key, $v);
             }
 
             return $self;