From 1822d0c8141602a129b51b45f9696d9eaf4a9cbe Mon Sep 17 00:00:00 2001 From: Dave Redfern Date: Mon, 7 Sep 2020 16:17:09 -0400 Subject: [PATCH] Fix potentially failing test if created user has no addresses --- tests/ModelTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/ModelTest.php b/tests/ModelTest.php index 67d0383..2fb9495 100644 --- a/tests/ModelTest.php +++ b/tests/ModelTest.php @@ -4,6 +4,7 @@ use BadMethodCallException; use PHPUnit\Framework\TestCase; +use Somnambulist\Collection\MutableCollection; use Somnambulist\Components\ReadModels\ModelBuilder; use Somnambulist\Components\ReadModels\ModelExporter; use Somnambulist\Components\ReadModels\Relationships\HasOneToMany; @@ -82,6 +83,7 @@ public function testAttributeExistence() 'name' => 'bob', 'is_active' => true, ]); + $user->setRelationshipValue('addresses', new MutableCollection()); $this->assertTrue(isset($user->name)); $this->assertTrue(isset($user->uuid));