fixes #4604 - if class contains constructor addFunction will no longer result in an error.
Merge branch 'hotfix/5378'

Close #5378
Merge pull request #5379 from steverhoades/hotfix/4604

fixes #4604
[#5379] Move test assets to separate files

- Moved classes, functions used by test case to separate files
Merge branch 'hotfix/5379' into develop

Forward port #5379