public function testCreateLikeErrorDuplicatedLike() { $_params = $this->_params; $_params['user_id'] = $this->_user_id; $response = $this->_getAuth($_params); //get created login information $like_infor = Like::get(array('user_id', 'rating_id', 'updated_at', 'created_at', 'id'))->last(); $this->assertNotNull($like_infor); $this->assertEquals(array("code" => ApiResponse::DUPLICATED_LIKE, "data" => ApiResponse::getErrorContent(ApiResponse::DUPLICATED_LIKE)), json_decode($response->getContent(), true)); }