public function actionEdit() { $id = $this->helpGquery('id', '0'); $comm = new Comment(); $comment = $comm->getComment(['id' => $id]); $comment['content_arr'] = explode(',', $comment['content']); $params = ['comment' => $comment]; return $this->render('edit', $params); }
public function testGetAuthorByComment() { $comment = $this->commentModel->getComment(2); $this->assertInstanceOf('common\\models\\User', $comment->getAuthor()->one()); }