replace preg_replace method by str_replace in parseBaseParam
factorise test and add test add* methods