Codeception / Codeception/c3

Constant C3_CODECOVERAGE_MEDIATE_STORAGE can be used before it's defined

Open
#37 3 comments 4 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
73
Forks
46
PR merge metrics
No merged PRs in 30d

Description

If these lines fail:

```php
try {
\Codeception\Configuration::config($config_file);
} catch (\Exception $e) {
__c3_error($e->getMessage());
}
```

due to `\Codeception\Configuration` not existing, then

```php
$errorLogFile = defined('C3_CODECOVERAGE_ERROR_LOG_FILE') ?
C3_CODECOVERAGE_ERROR_LOG_FILE :
C3_CODECOVERAGE_MEDIATE_STORAGE . DIRECTORY_SEPARATOR . 'error.txt';
```

is called before

```php
define('C3_CODECOVERAGE_MEDIATE_STORAGE', Codeception\Configuration::logDir() . 'c3tmp');
define('C3_CODECOVERAGE_PROJECT_ROOT', Codeception\Configuration::projectDir());
define('C3_CODECOVERAGE_TESTNAME', $_SERVER['HTTP_X_CODECEPTION_CODECOVERAGE']);
```
is run.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.