1
1
/**
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 {
7
7
8
8
// The name of the module used in cfmappings ,etc
9
- request .MODULE_NAME = " @MODULE_NAME@ " ;
9
+ request .MODULE_NAME = " cbvalidation " ;
10
10
// 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 " ;
12
12
13
13
// 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 ;
19
19
// Turn on/off white space management
20
20
this .whiteSpaceManagement = " smart" ;
21
- this .enableNullSupport = shouldEnableFullNullSupport ();
21
+ this .enableNullSupport = shouldEnableFullNullSupport ();
22
22
23
23
// Create testing mapping
24
24
this .mappings [ " /tests" ] = getDirectoryFromPath ( getCurrentTemplatePath () );
25
25
26
26
// 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 ;
29
29
30
30
// 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 #" ;
34
38
35
39
// ORM Definitions
36
40
/**
@@ -50,20 +54,19 @@ component{
50
54
**/
51
55
52
56
function onRequestStart ( required targetPage ){
53
-
54
57
// Set a high timeout for long running tests
55
- setting requestTimeout = " 9999" ;
58
+ setting requestTimeout = " 9999" ;
56
59
// 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" );
58
61
59
62
// If hitting the runner or specs, prep our virtual app
60
63
if ( getBaseTemplatePath ().replace ( expandPath ( " /tests" ), " " ).reFindNoCase ( " (runner|specs)" ) ) {
61
64
request .coldBoxVirtualApp .startup ( true );
62
65
}
63
66
64
67
// 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" ) ) {
67
70
pagePoolClear ();
68
71
}
69
72
// ormReload();
@@ -73,13 +76,14 @@ component{
73
76
return true ;
74
77
}
75
78
76
- public void function onRequestEnd ( required targetPage ) {
79
+ public void function onRequestEnd ( required targetPage ){
77
80
request .coldBoxVirtualApp .shutdown ();
78
81
}
79
82
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
+
85
89
}
0 commit comments