From 3a51dcd1fbf6678f5a66ea1aa41eb4709788162e Mon Sep 17 00:00:00 2001 From: kitchenu Date: Tue, 1 Aug 2017 18:39:18 +0900 Subject: [PATCH] Fix testHasManyNewEntitySaveRelation() --- tests/CRUD.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/CRUD.php b/tests/CRUD.php index d0c313c..89a41f5 100644 --- a/tests/CRUD.php +++ b/tests/CRUD.php @@ -461,6 +461,7 @@ public function testHasManyNewEntitySaveRelation() $post->relation('comments', new \Spot\Entity\Collection($comments)); $mapper->save($post, ['relations' => true]); $this->assertEquals($commentMapper->get($removedComment->primaryKey()), false); + $this->assertEquals($commentMapper->where(['post_id' => $post->id])->count(), 1); //Test all comments removed when relation set to false $post->relation('comments', false);