merged JS and PHP tests