Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6067 from Naktibalda/5.0
Codeception 5.0
- Loading branch information
Showing
83 changed files
with
4,688 additions
and
373 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?php | ||
|
||
// function not autoloaded in PHP, thus its a good place for them | ||
function codecept_debug($data) | ||
{ | ||
\Codeception\Util\Debug::debug($data); | ||
} | ||
|
||
function codecept_root_dir($appendPath = '') | ||
{ | ||
return \Codeception\Configuration::projectDir() . $appendPath; | ||
} | ||
|
||
function codecept_output_dir($appendPath = '') | ||
{ | ||
return \Codeception\Configuration::outputDir() . $appendPath; | ||
} | ||
|
||
function codecept_log_dir($appendPath = '') | ||
{ | ||
return \Codeception\Configuration::outputDir() . $appendPath; | ||
} | ||
|
||
|
||
function codecept_data_dir($appendPath = '') | ||
{ | ||
return \Codeception\Configuration::dataDir() . $appendPath; | ||
} | ||
|
||
function codecept_relative_path($path) | ||
{ | ||
return \Codeception\Util\PathResolver::getRelativeDir( | ||
$path, | ||
\Codeception\Configuration::projectDir(), | ||
DIRECTORY_SEPARATOR | ||
); | ||
} | ||
|
||
/** | ||
* If $path is absolute, it will be returned without changes. | ||
* If $path is relative, it will be passed to `codecept_root_dir()` function | ||
* to make it absolute. | ||
* | ||
* @param string $path | ||
* @return string the absolute path | ||
*/ | ||
function codecept_absolute_path($path) | ||
{ | ||
return codecept_is_path_absolute($path) ? $path : codecept_root_dir($path); | ||
} | ||
|
||
/** | ||
* Check whether the given $path is absolute. | ||
* | ||
* @param string $path | ||
* @return bool | ||
* @since 2.4.4 | ||
*/ | ||
function codecept_is_path_absolute($path) | ||
{ | ||
return \Codeception\Util\PathResolver::isPathAbsolute($path); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.