/** * @afterClass */ public static function tearDownAfterClass() { \ResponsesQuery::create()->deleteAll(); \ExpertQuestionStateQuery::create()->deleteAll(); \ExpertGroupMembersQuery::create()->deleteAll(); \ExpertGroupQuery::create()->deleteAll(); \ExpertsQuery::create()->deleteAll(); \QuestionsQuery::create()->deleteAll(); }
private function updateQuestionState($conn) { $state = new \ExpertQuestionState(); $state->setExperts(ExpertsQuery::create()->findOneByUsername($this->getExpert())); $state->setQuestionId($this->getQuestionId()); $state->setIsResponded(true); $state->setIsRead(true); $state->save(); }