tests: added tests for formatTemplateFiles & formatLayoutTemplateFiles
BadRequestException: property $defaultCode replaced with $code