Skip to content

Commit

Permalink
Fix potentially failing test if created user has no addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
dave-redfern committed Sep 7, 2020
1 parent 9619be3 commit 1822d0c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/ModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 1822d0c

Please sign in to comment.