11/**
2- * Copyright 2005-2007 ColdBox Framework by Luis Majano and Ortus Solutions, Corp
3- * www.ortussolutions.com
4- * ---
5- */
6- component {
2+ * Copyright 2005-2007 ColdBox Framework by Luis Majano and Ortus Solutions, Corp
3+ * www.ortussolutions.com
4+ * ---
5+ */
6+ component {
77
88 // The name of the module used in cfmappings ,etc
9- request .MODULE_NAME = " @MODULE_NAME@ " ;
9+ request .MODULE_NAME = " cbvalidation " ;
1010 // The directory name of the module on disk. Usually, it's the same as the module name
11- request .MODULE_PATH = " @MODULE_NAME@ " ;
11+ request .MODULE_PATH = " cbvalidation " ;
1212
1313 // APPLICATION CFC PROPERTIES
14- this .name = " #request .MODULE_NAME # Testing Suite" ;
15- this .sessionManagement = true ;
16- this .sessionTimeout = createTimeSpan ( 0 , 0 , 15 , 0 );
17- this .applicationTimeout = createTimeSpan ( 0 , 0 , 15 , 0 );
18- this .setClientCookies = true ;
14+ this .name = " #request .MODULE_NAME # Testing Suite" ;
15+ this .sessionManagement = true ;
16+ this .sessionTimeout = createTimespan ( 0 , 0 , 15 , 0 );
17+ this .applicationTimeout = createTimespan ( 0 , 0 , 15 , 0 );
18+ this .setClientCookies = true ;
1919 // Turn on/off white space management
2020 this .whiteSpaceManagement = " smart" ;
21- this .enableNullSupport = shouldEnableFullNullSupport ();
21+ this .enableNullSupport = shouldEnableFullNullSupport ();
2222
2323 // Create testing mapping
2424 this .mappings [ " /tests" ] = getDirectoryFromPath ( getCurrentTemplatePath () );
2525
2626 // The application root
27- rootPath = REReplaceNoCase ( this .mappings [ " /tests" ], " tests(\\|/)" , " " );
28- this .mappings [ " /root" ] = rootPath ;
27+ rootPath = reReplaceNoCase ( this .mappings [ " /tests" ], " tests(\\|/)" , " " );
28+ this .mappings [ " /root" ] = rootPath ;
2929
3030 // The module root path
31- moduleRootPath = REReplaceNoCase ( rootPath , " #request .MODULE_PATH #(\\|/)test-harness(\\|/)" , " " );
32- this .mappings [ " /moduleroot" ] = moduleRootPath ;
33- this .mappings [ " /#request .MODULE_NAME #" ] = moduleRootPath & " #request .MODULE_PATH #" ;
31+ moduleRootPath = reReplaceNoCase (
32+ rootPath ,
33+ " #request .MODULE_PATH #(\\|/)test-harness(\\|/)" ,
34+ " "
35+ );
36+ this .mappings [ " /moduleroot" ] = moduleRootPath ;
37+ this .mappings [ " /#request .MODULE_NAME #" ] = moduleRootPath & " #request .MODULE_PATH #" ;
3438
3539 // ORM Definitions
3640 /**
@@ -50,20 +54,19 @@ component{
5054 **/
5155
5256 function onRequestStart ( required targetPage ){
53-
5457 // Set a high timeout for long running tests
55- setting requestTimeout = " 9999" ;
58+ setting requestTimeout = " 9999" ;
5659 // New ColdBox Virtual Application Starter
57- request .coldBoxVirtualApp = new coldbox .system .testing .VirtualApp ( appMapping = " /root" );
60+ request .coldBoxVirtualApp = new coldbox .system .testing .VirtualApp ( appMapping = " /root" );
5861
5962 // If hitting the runner or specs, prep our virtual app
6063 if ( getBaseTemplatePath ().replace ( expandPath ( " /tests" ), " " ).reFindNoCase ( " (runner|specs)" ) ) {
6164 request .coldBoxVirtualApp .startup ( true );
6265 }
6366
6467 // ORM Reload for fresh results
65- if ( structKeyExists ( url , " fwreinit" ) ){
66- if ( structKeyExists ( server , " lucee" ) ){
68+ if ( structKeyExists ( url , " fwreinit" ) ) {
69+ if ( structKeyExists ( server , " lucee" ) ) {
6770 pagePoolClear ();
6871 }
6972 // ormReload();
@@ -73,13 +76,14 @@ component{
7376 return true ;
7477 }
7578
76- public void function onRequestEnd ( required targetPage ) {
79+ public void function onRequestEnd ( required targetPage ){
7780 request .coldBoxVirtualApp .shutdown ();
7881 }
7982
80- private boolean function shouldEnableFullNullSupport () {
81- var system = createObject ( " java" , " java.lang.System" );
82- var value = system .getEnv ( " FULL_NULL" );
83- return isNull ( value ) ? false : !! value ;
84- }
83+ private boolean function shouldEnableFullNullSupport (){
84+ var system = createObject ( " java" , " java.lang.System" );
85+ var value = system .getEnv ( " FULL_NULL" );
86+ return isNull ( value ) ? false : !! value ;
87+ }
88+
8589}
0 commit comments