@@ -62,32 +62,48 @@ function json_last_error_msg()
62
62
}
63
63
64
64
// function not autoloaded in PHP, thus its a good place for them
65
- function codecept_debug ($ data )
66
- {
67
- \Codeception \Util \Debug::debug ($ data );
65
+ if (!function_exists ('codecept_debug ' )) {
66
+ function codecept_debug ($ data )
67
+ {
68
+ \Codeception \Util \Debug::debug ($ data );
69
+ }
68
70
}
69
71
70
- function codecept_root_dir ($ appendPath = '' )
71
- {
72
- return \Codeception \Configuration::projectDir () . $ appendPath ;
72
+ if (!function_exists ('codecept_root_dir ' )) {
73
+ function codecept_root_dir ($ appendPath = '' )
74
+ {
75
+ return \Codeception \Configuration::projectDir () . $ appendPath ;
76
+ }
73
77
}
74
78
75
- function codecept_output_dir ($ appendPath = '' )
76
- {
77
- return \Codeception \Configuration::outputDir () . $ appendPath ;
79
+ if (!function_exists ('codecept_output_dir ' )) {
80
+ function codecept_output_dir ($ appendPath = '' )
81
+ {
82
+ return \Codeception \Configuration::outputDir () . $ appendPath ;
83
+ }
78
84
}
79
85
80
- function codecept_log_dir ($ appendPath = '' )
81
- {
82
- return \Codeception \Configuration::outputDir () . $ appendPath ;
86
+ if (!function_exists ('codecept_log_dir ' )) {
87
+ function codecept_log_dir ($ appendPath = '' )
88
+ {
89
+ return \Codeception \Configuration::outputDir () . $ appendPath ;
90
+ }
83
91
}
84
92
85
- function codecept_data_dir ($ appendPath = '' )
86
- {
87
- return \Codeception \Configuration::dataDir () . $ appendPath ;
93
+ if (!function_exists ('codecept_data_dir ' )) {
94
+ function codecept_data_dir ($ appendPath = '' )
95
+ {
96
+ return \Codeception \Configuration::dataDir () . $ appendPath ;
97
+ }
88
98
}
89
99
90
- function codecept_relative_path ($ path )
91
- {
92
- return \Codeception \Util \PathResolver::getRelativeDir ($ path , \Codeception \Configuration::projectDir (), DIRECTORY_SEPARATOR );
100
+ if (!function_exists ('codecept_relative_path ' )) {
101
+ function codecept_relative_path ($ path )
102
+ {
103
+ return \Codeception \Util \PathResolver::getRelativeDir (
104
+ $ path ,
105
+ \Codeception \Configuration::projectDir (),
106
+ DIRECTORY_SEPARATOR
107
+ );
108
+ }
93
109
}
0 commit comments