/wheels/tests/global/public/humanize.cfc
ColdFusion CFScript | 33 lines | 26 code | 7 blank | 0 comment | 0 complexity | 6729395a4e871be2a9901d83cb1500b9 MD5 | raw file
Possible License(s): Apache-2.0, CPL-1.0
- <cfcomponent extends="wheelsMapping.Test">
-
- <cffunction name="test_normal_variable">
- <cfset loc.result = humanize("wheelsIsAFramework")>
- <cfset assert("NOT Compare(loc.result, 'Wheels Is A Framework')")>
- </cffunction>
-
- <cffunction name="test_variable_starting_with_uppercase">
- <cfset loc.result = humanize("WheelsIsAFramework")>
- <cfset assert("NOT Compare(loc.result, 'Wheels Is A Framework')")>
- </cffunction>
-
- <cffunction name="test_abbreviation">
- <cfset loc.result = humanize("CFML")>
- <cfset assert("NOT Compare(loc.result, 'CFML')")>
- </cffunction>
-
- <cffunction name="test_abbreviation_as_exception">
- <cfset loc.result = humanize(text="ACfmlFramework", except="CFML")>
- <cfset assert("NOT Compare(loc.result, 'A CFML Framework')")>
- </cffunction>
-
- <cffunction name="test_exception_within_string">
- <cfset loc.result = humanize(text="ACfmlFramecfmlwork", except="CFML")>
- <cfset assert("NOT Compare(loc.result, 'A CFML Framecfmlwork')")>
- </cffunction>
-
- <cffunction name="test_abbreviation_without_exception_cannot_be_done">
- <cfset loc.result = humanize("wheelsIsACFMLFramework")>
- <cfset assert("NOT Compare(loc.result, 'Wheels Is ACFML Framework')")>
- </cffunction>
-
- </cfcomponent>