Changeset 1742
- Timestamp:
- 08/29/08 01:20:02 (4 months ago)
- Files:
-
- coldbox/trunk/ApplicationTemplate/handlers/tests/cfcunit/generalTest.cfc (modified) (1 diff)
- coldbox/trunk/ApplicationTemplate/handlers/tests/cfcunit/mainTest.cfc (modified) (1 diff)
- coldbox/trunk/ApplicationTemplate/handlers/tests/mxunit/generalTest.cfc (modified) (1 diff)
- coldbox/trunk/ApplicationTemplate/handlers/tests/mxunit/mainTest.cfc (modified) (1 diff)
- coldbox/trunk/system/extras/testing/baseMXUnitTest.cfc (modified) (3 diffs)
- coldbox/trunk/system/extras/testing/baseTest.cfc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
coldbox/trunk/ApplicationTemplate/handlers/tests/cfcunit/generalTest.cfc
r1547 r1742 7 7 -----------------------------------------------------------------------> 8 8 <cfcomponent name="generalTest" extends="coldbox.system.extras.testing.baseTest" output="false"> 9 9 10 <cfscript> 11 //Uncomment the following if you need the controller in application scope. 12 //this.PERSIST_FRAMEWORK = true; 13 </cfscript> 14 10 15 <cffunction name="setUp" returntype="void" access="private" output="false"> 11 16 <cfscript> coldbox/trunk/ApplicationTemplate/handlers/tests/cfcunit/mainTest.cfc
r1547 r1742 9 9 <cfcomponent name="mainTest" extends="coldbox.system.extras.testing.baseTest" output="false"> 10 10 11 <cfscript> 12 //Uncomment the following if you need the controller in application scope. 13 //this.PERSIST_FRAMEWORK = true; 14 </cfscript> 15 11 16 <cffunction name="setUp" returntype="void" access="private" output="false"> 12 17 <cfscript> coldbox/trunk/ApplicationTemplate/handlers/tests/mxunit/generalTest.cfc
r1547 r1742 7 7 -----------------------------------------------------------------------> 8 8 <cfcomponent name="generalTest" extends="coldbox.system.extras.testing.baseMXUnitTest" output="false"> 9 10 <cfscript> 11 //Uncomment the following if you need the controller in application scope. 12 //this.PERSIST_FRAMEWORK = true; 13 </cfscript> 9 14 10 15 <cffunction name="setUp" returntype="void" access="public" output="false"> coldbox/trunk/ApplicationTemplate/handlers/tests/mxunit/mainTest.cfc
r1547 r1742 8 8 -----------------------------------------------------------------------> 9 9 <cfcomponent name="mainTest" extends="coldbox.system.extras.testing.baseMXUnitTest" output="false"> 10 11 <cfscript> 12 //Uncomment the following if you need the controller in application scope. 13 //this.PERSIST_FRAMEWORK = true; 14 </cfscript> 10 15 11 16 <cffunction name="setup" returntype="void" access="public" output="false"> coldbox/trunk/system/extras/testing/baseMXUnitTest.cfc
r1533 r1742 31 31 instance.ConfigMapping = ""; 32 32 instance.controller = ""; 33 /* Public Persistence Properties */ 34 this.PERSIST_FRAMEWORK = false; 33 35 </cfscript> 34 36 … … 38 40 instance.controller = CreateObject("component", "coldbox.system.testcontroller").init( expandPath(instance.AppMapping) ); 39 41 instance.controller.getLoaderService().setupCalls(instance.ConfigMapping,instance.AppMapping); 40 42 43 /* Verify Persistence */ 44 if( this.PERSIST_FRAMEWORK ){ 45 application.cbController = instance.controller; 46 } 47 41 48 //Create Initial Event Context 42 49 setupRequest(); 43 //Clean up Initial Event Context due to MACH-II vars of the unit test framework. 50 51 //Clean up Initial Event Context 44 52 getRequestContext().clearCollection(); 53 </cfscript> 54 </cffunction> 55 56 <cffunction name="tearDown" access="public" returntype="void" hint="The teardown" output="false" > 57 <cfscript> 58 if( this.PERSIST_FRAMEWORK ){ 59 structDelete(application,"cbController"); 60 } 45 61 </cfscript> 46 62 </cffunction> … … 72 88 <!--- getter for controller ---> 73 89 <cffunction name="getcontroller" access="private" returntype="any" output="false" hint="Get a reference to the ColdBox controller"> 90 <cfif this.PERSIST_FRAMEWORK> 91 <cfset instance.controller = application.cbController> 92 </cfif> 74 93 <cfreturn instance.controller> 75 94 </cffunction> coldbox/trunk/system/extras/testing/baseTest.cfc
r1533 r1742 33 33 instance.ConfigMapping = ""; 34 34 instance.controller = ""; 35 /* Public Persistence Properties */ 36 this.PERSIST_FRAMEWORK = false; 35 37 </cfscript> 36 38 … … 40 42 instance.controller = CreateObject("component", "coldbox.system.testcontroller").init( expandPath(instance.AppMapping) ); 41 43 instance.controller.getLoaderService().setupCalls(instance.ConfigMapping,instance.AppMapping); 42 44 45 /* Verify Persistence */ 46 if( this.PERSIST_FRAMEWORK ){ 47 application.cbController = instance.controller; 48 } 49 43 50 //Create Initial Event Context 44 51 setupRequest(); 45 //Clean up Initial Event Context due to MACH-II vars of the unit test framework. 52 53 //Clean up Initial Event Context 46 54 getRequestContext().clearCollection(); 55 </cfscript> 56 </cffunction> 57 58 <cffunction name="tearDown" access="public" returntype="void" hint="The teardown" output="false" > 59 <cfscript> 60 if( this.PERSIST_FRAMEWORK ){ 61 structDelete(application,"cbController"); 62 } 47 63 </cfscript> 48 64 </cffunction> … … 74 90 <!--- getter for controller ---> 75 91 <cffunction name="getcontroller" access="private" returntype="any" output="false" hint="Get a reference to the ColdBox controller"> 92 <cfif this.PERSIST_FRAMEWORK> 93 <cfset instance.controller = application.cbController> 94 </cfif> 76 95 <cfreturn instance.controller> 77 96 </cffunction>
