/** * @dataProvider unsetRelationProvider */ public function testUnsetRelationBelongsTo($value) { $book = new Book($this->conn, ['id' => 3]); $details = new BookDetails($this->conn, ['books_id' => 5]); $details->associateRelation('book', $book); $this->assertSame(3, $details->books_id); $this->assertSame($book, $details->book); $details->unsetRelation('book', $value); $this->assertSame($value, $details->books_id); $this->assertFalse($details->book); }