PageRenderTime 75ms CodeModel.GetById 33ms app.highlight 1ms RepoModel.GetById 39ms app.codeStats 1ms

/wheels/tests/global/deprecated.cfc

http://cfwheels.googlecode.com/
ColdFusion CFScript | 28 lines | 23 code | 5 blank | 0 comment | 0 complexity | b68e4f7ec41c4f826db0b4e8f333269d MD5 | raw file
 1<cfcomponent extends="wheelsMapping.Test">
 2
 3	<cffunction name="setup">
 4		<cfset loc.controller = controller(name="dummy")>
 5		<cfset loc.controller.$test_deprecated_method = $test_deprecated_method>
 6	</cffunction>
 7
 8	<cffunction name="test_deprecated_message">
 9		<!--- correct message --->
10		<cfset loc.a = loc.controller.$test_deprecated_method()>
11		<cfset loc.e = loc.a.message>
12		<cfset loc.r = "_deprecated_">
13		<cfset assert("loc.e eq loc.r")>
14	</cffunction>
15
16	<cffunction name="test_deprecated_method_called">
17		<!--- correct method name. regex might fail on different engines --->
18		<cfset loc.a = loc.controller.$test_deprecated_method()>
19		<cfset loc.e = loc.a.method>
20		<cfset loc.r = "test_deprecated_method_called">
21		<cfset assert("loc.e eq loc.r")>
22	</cffunction>
23
24	<cffunction name="$test_deprecated_method">
25		<cfreturn $deprecated("_deprecated_", false)>
26	</cffunction>
27
28</cfcomponent>