question = 1; $vote->score = 1; $vote->createdBy = new NullAccount(1); $id = QAQuestionVoteMapper::create()->execute($vote); self::assertGreaterThan(0, $vote->getId()); self::assertEquals($id, $vote->getId()); $voteR = QAQuestionVoteMapper::get()->where('id', $vote->getId())->execute(); self::assertEquals($vote->question, $voteR->question); self::assertEquals($vote->score, $voteR->score); self::assertEquals(1, QAQuestionVoteMapper::findVote(1, 1)->getId()); } }