HumHub Documentation (unofficial)

LocalServer extends SuiteSubscriber

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

public mixed COVERAGE_COOKIE = 'CODECEPTION_CODECOVERAGE'
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' => '']]

$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]

Methods

__construct()

public __construct([mixed $options = [] ]) : mixed
Parameters
$options : mixed = []

applyFilter()

public applyFilter(TestResult $result) : mixed
Parameters
$result : TestResult

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

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|null

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
$this

startCoverageCollection()

protected startCoverageCollection(mixed $testName) : mixed
Parameters
$testName : mixed

        
On this page

Search results