LocalServer
extends SuiteSubscriber
in package
When collecting code coverage data from local server HTTP requests are sent to c3.php file.
Coverage Collection is started by sending cookies/headers. Result is taken from the local file and merged with local code coverage results.
Class LocalServer
Table of Contents
Constants
- COVERAGE_COOKIE = 'CODECEPTION_CODECOVERAGE'
- COVERAGE_COOKIE_ERROR = 'CODECEPTION_CODECOVERAGE_ERROR'
- COVERAGE_HEADER = 'X-Codeception-CodeCoverage'
- COVERAGE_HEADER_CONFIG = 'X-Codeception-CodeCoverage-Config'
- COVERAGE_HEADER_ERROR = 'X-Codeception-CodeCoverage-Error'
- COVERAGE_HEADER_SUITE = 'X-Codeception-CodeCoverage-Suite'
Properties
- $events : mixed
- $c3Access : mixed
- $coverage : mixed
- $defaultSettings : mixed
- $filters : mixed
- $logDir : mixed
- $module : Web
- $modules : mixed
- $options : mixed
- $settings : mixed
- $suiteName : mixed
Methods
- __construct() : mixed
- afterStep() : mixed
- afterSuite() : mixed
- applyFilter() : mixed
- beforeSuite() : mixed
- beforeTest() : mixed
- getSubscribedEvents() : mixed
- addC3AccessHeader() : mixed
- applySettings() : mixed
- c3Request() : mixed
- fetchErrors() : mixed
- getRemoteError() : mixed
- getServerConnectionModule() : Remote|null
- isEnabled() : mixed
- mergeToPrint() : mixed
- preProcessCoverage() : $this
- Allows Translating Remote Paths To Local (IE: When Using Docker)
- startCoverageCollection() : mixed
Constants
COVERAGE_COOKIE
public
mixed
COVERAGE_COOKIE
= 'CODECEPTION_CODECOVERAGE'
COVERAGE_COOKIE_ERROR
public
mixed
COVERAGE_COOKIE_ERROR
= 'CODECEPTION_CODECOVERAGE_ERROR'
COVERAGE_HEADER
public
mixed
COVERAGE_HEADER
= 'X-Codeception-CodeCoverage'
COVERAGE_HEADER_CONFIG
public
mixed
COVERAGE_HEADER_CONFIG
= 'X-Codeception-CodeCoverage-Config'
COVERAGE_HEADER_ERROR
public
mixed
COVERAGE_HEADER_ERROR
= 'X-Codeception-CodeCoverage-Error'
COVERAGE_HEADER_SUITE
public
mixed
COVERAGE_HEADER_SUITE
= 'X-Codeception-CodeCoverage-Suite'
Properties
$events
public
static mixed
$events
= [\Codeception\Events::SUITE_BEFORE => 'beforeSuite', \Codeception\Events::TEST_BEFORE => 'beforeTest', \Codeception\Events::STEP_AFTER => 'afterStep', \Codeception\Events::SUITE_AFTER => 'afterSuite']
$c3Access
protected
mixed
$c3Access
= ['http' => ['method' => "GET", 'header' => '']]
$coverage
protected
mixed
$coverage
$defaultSettings
protected
mixed
$defaultSettings
= ['enabled' => false, 'remote' => false, 'local' => false, 'xdebug_session' => 'codeception', 'remote_config' => null, 'show_uncovered' => false, 'c3_url' => null, 'work_dir' => null, 'cookie_domain' => null]
$filters
protected
mixed
$filters
= []
$logDir
protected
mixed
$logDir
$module
protected
Web
$module
$modules
protected
mixed
$modules
= []
$options
protected
mixed
$options
$settings
protected
mixed
$settings
= []
$suiteName
protected
mixed
$suiteName
Methods
__construct()
public
__construct([mixed $options = [] ]) : mixed
Parameters
- $options : mixed = []
afterStep()
public
afterStep(StepEvent $e) : mixed
Parameters
- $e : StepEvent
afterSuite()
public
afterSuite(SuiteEvent $e) : mixed
Parameters
- $e : SuiteEvent
applyFilter()
public
applyFilter(TestResult $result) : mixed
Parameters
- $result : TestResult
beforeSuite()
public
beforeSuite(SuiteEvent $e) : mixed
Parameters
- $e : SuiteEvent
beforeTest()
public
beforeTest(TestEvent $e) : mixed
Parameters
- $e : TestEvent
getSubscribedEvents()
public
static getSubscribedEvents() : mixed
addC3AccessHeader()
protected
addC3AccessHeader(mixed $header, mixed $value) : mixed
Parameters
- $header : mixed
- $value : mixed
applySettings()
protected
applySettings(mixed $settings) : mixed
Parameters
- $settings : mixed
c3Request()
protected
c3Request(mixed $action) : mixed
Parameters
- $action : mixed
fetchErrors()
protected
fetchErrors() : mixed
getRemoteError()
protected
getRemoteError(mixed $headers) : mixed
Parameters
- $headers : mixed
getServerConnectionModule()
protected
getServerConnectionModule(array<string|int, mixed> $modules) : Remote|null
Parameters
- $modules : array<string|int, mixed>
Return values
Remote|nullisEnabled()
protected
isEnabled() : mixed
mergeToPrint()
protected
mergeToPrint(mixed $coverage) : mixed
Parameters
- $coverage : mixed
preProcessCoverage()
Allows Translating Remote Paths To Local (IE: When Using Docker)
protected
preProcessCoverage(CodeCoverage $coverage) : $this
Parameters
- $coverage : CodeCoverage
Return values
$thisstartCoverageCollection()
protected
startCoverageCollection(mixed $testName) : mixed
Parameters
- $testName : mixed