fixes #4604 - if class contains constructor addFunction will no longer result in an error.
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'

Close #5379