TEST
Disables or enables test mode.
Developers are free to do their things when this constant contains a certain value. In general, you would use this value for testing purposes. Setting a truthy value to this constant will activates the error reporting mode in PHP.
if (defined('TEST') && TEST) {
throw new Exception('Yo!');
}
You are not forced to set its value to a literal true
to enable the test mode. You can set any value to it and Mecha will take the truthy value as an indicator to activate the test mode. Then, certain extensions can use that value to enable their test mode or to run certain tests that they provide.
if (defined('TEST') && 'x.minify' === TEST) {
// Run specific tests for `minify` extension!
}
D
Returns the directory separator.
ENGINE
Returns the engine folder path.
LOT
Returns the lot folder path.
N
Returns the line ending character of current operating system.
PATH
Returns the application root path without the trailing directory separator.
P
Returns a placeholder character.
S
Returns an empty space character.
TEST
Disables or enables test mode.
VERSION
Returns the current application version.