PageRenderTime 388ms CodeModel.GetById 222ms app.highlight 3ms RepoModel.GetById 158ms app.codeStats 1ms

/wheels/tests/view/miscellaneous/tag.cfc

http://cfwheels.googlecode.com/
ColdFusion CFScript | 30 lines | 27 code | 3 blank | 0 comment | 0 complexity | 27f8f8444fe7eea9b760bb374426f617 MD5 | raw file
 1<cfcomponent extends="wheelsMapping.Test">
 2
 3	<cffunction name="setup">
 4		<cfset loc.controller = controller(name="dummy")>
 5		<cfset loc.args = {}>
 6		<cfset loc.args.name = "input">
 7		<cfset loc.args.close = true>
 8		<cfset loc.args.attributes = {}>
 9		<cfset loc.args.attributes.type = "text">
10		<cfset loc.args.attributes.class = "wheelstest">
11		<cfset loc.args.attributes.size = "30">
12		<cfset loc.args.attributes.maxlength = "50">
13		<cfset loc.args.attributes.name = "inputtest">
14		<cfset loc.args.attributes.firstname = "tony">
15		<cfset loc.args.attributes.lastname = "petruzzi">
16		<cfset loc.args.attributes._firstname = "tony">
17		<cfset loc.args.attributes._lastname = "petruzzi">
18		<cfset loc.args.attributes.id = "inputtest">
19		<cfset loc.args.skip = "firstname,lastname">
20		<cfset loc.args.skipStartingWith = "_">
21		<cfset loc.args.attributes.onmouseover = "function(this){this.focus();}">
22	</cffunction>
23
24	<cffunction name="test_with_all_options">
25		<cfset loc.e = loc.controller.$tag(argumentCollection=loc.args)>
26		<cfset loc.r = '<input class="wheelstest" id="inputtest" maxlength="50" name="inputtest" onmouseover="function(this){this.focus();}" size="30" type="text" />'>
27		<cfset assert("loc.e eq loc.r")>
28	</cffunction>
29
30</cfcomponent>