PageRenderTime 8ms CodeModel.GetById 2ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/wheels/tests/view/miscellaneous/$getobject.cfc

http://cfwheels.googlecode.com/
ColdFusion CFScript | 23 lines | 18 code | 5 blank | 0 comment | 0 complexity | c101792a66f4e5e31a2e4272836c1cc1 MD5 | raw file
 1<cfcomponent extends="wheelsMapping.Test">
 2
 3	<cfinclude template="/wheelsMapping/view/miscellaneous.cfm">
 4
 5	<cffunction name="test_getting_object_from_request_scope">
 6		<cfset request.obj = model("post").findOne()>
 7		<cfset loc.result = $getObject("request.obj")>
 8		<cfset assert("IsObject(loc.result)")>
 9	</cffunction>
10
11	<cffunction name="test_getting_object_from_default_scope">
12		<cfset obj = model("post").findOne()>
13		<cfset loc.result = $getObject("obj")>
14		<cfset assert("IsObject(loc.result)")>
15	</cffunction>
16
17	<cffunction name="test_getting_object_from_variables_scope">
18		<cfset variables.obj = model("post").findOne()>
19		<cfset loc.result = $getObject("variables.obj")>
20		<cfset assert("IsObject(loc.result)")>
21	</cffunction>
22
23</cfcomponent>