public function testSetRawCallsSetRelation() { $book = new Book($this->conn, ['id' => 5]); $details = new BookDetails($this->conn, ['books_id' => 3]); $book->setRaw('details', $details); $this->assertSame($details, $book->getRelation('details')); $this->assertSame(5, $details->books_id); }