public function testVoteDown_NoVote_NoChange() { $e = new UserVoteTestEnvironment(); $e->create(); $dto = $e->addAnswer('Some answer'); // var_dump($dto, $e->answerId); $answer0 = $dto[$e->answerId]; $this->assertEqual(0, $answer0['score']); $dto = QuestionCommands::voteDown($e->userId, $e->projectId, $e->questionId, $e->answerId); // var_dump($dto, $e->answerId); $this->assertIsA($dto, 'array'); $answer1 = $dto[$e->answerId]; $this->assertEqual(0, $answer1['score']); }
public function answer_vote_down($questionId, $answerId) { return QuestionCommands::voteDown($this->_userId, $this->_projectId, $questionId, $answerId); }