Documentation

PhpUnitTestAnnotationFixer extends AbstractPhpUnitFixer
in package
implements ConfigurationDefinitionFixerInterface, WhitespacesAwareFixerInterface

Tags
author

Gert de Pagter

Interfaces, Classes and Traits

ConfigurationDefinitionFixerInterface
WhitespacesAwareFixerInterface

Table of Contents

getDefinition()  : mixed
{@inheritdoc}
getPriority()  : mixed
{@inheritdoc}
isRisky()  : mixed
{@inheritdoc}
applyPhpUnitClassFix()  : mixed
{@inheritdoc}
createConfigurationDefinition()  : mixed
{@inheritdoc}
addTestAnnotation()  : array<string|int, Line>
addTestPrefix()  : string
addTestPrefixToDependsAnnotation()  : Line
applyTestAnnotation()  : mixed
applyTestPrefix()  : mixed
createDocBlock()  : mixed
doesDocBlockContainTest()  : bool
findWhereDependsFunctionNameStarts()  : int
Helps to find where the function name in the doc block starts.
getSingleLineDocBlockEntry()  : string
hasProperTestAnnotation()  : bool
hasTestPrefix()  : bool
isMethod()  : bool
isTestMethod()  : bool
removeTestPrefix()  : string
removeTestPrefixFromDependsAnnotation()  : Line
splitUpDocBlock()  : array<string|int, Line>
Take a one line doc block, and turn it into a multi line doc block.
updateDependsAnnotation()  : Line
Updates the depends tag on the current doc block.
updateDocBlock()  : array<string|int, Line>
updateLines()  : array<string|int, Line>

Methods

getPriority()

{@inheritdoc}

public getPriority() : mixed

Must run before NoEmptyPhpdocFixer, PhpUnitMethodCasingFixer, PhpdocTrimFixer.

Return values
mixed

applyPhpUnitClassFix()

{@inheritdoc}

protected applyPhpUnitClassFix(Tokens $tokens, mixed $startIndex, mixed $endIndex) : mixed
Parameters
$tokens : Tokens
$startIndex : mixed
$endIndex : mixed
Return values
mixed

createConfigurationDefinition()

{@inheritdoc}

protected createConfigurationDefinition() : mixed
Return values
mixed

addTestAnnotation()

private addTestAnnotation(array<string|int, Line$lines, Tokens $tokens, int $docBlockIndex) : array<string|int, Line>
Parameters
$lines : array<string|int, Line>
$tokens : Tokens
$docBlockIndex : int
Return values
array<string|int, Line>

addTestPrefix()

private addTestPrefix(string $functionName) : string
Parameters
$functionName : string
Return values
string

applyTestAnnotation()

private applyTestAnnotation(Tokens $tokens, int $startIndex, int $endIndex) : mixed
Parameters
$tokens : Tokens
$startIndex : int
$endIndex : int
Return values
mixed

applyTestPrefix()

private applyTestPrefix(Tokens $tokens, int $startIndex, int $endIndex) : mixed
Parameters
$tokens : Tokens
$startIndex : int
$endIndex : int
Return values
mixed

findWhereDependsFunctionNameStarts()

Helps to find where the function name in the doc block starts.

private findWhereDependsFunctionNameStarts(array<string|int, mixed> $line) : int
Parameters
$line : array<string|int, mixed>
Return values
int

getSingleLineDocBlockEntry()

private getSingleLineDocBlockEntry(array<string|int, Line$lines) : string
Parameters
$lines : array<string|int, Line>
Return values
string

hasTestPrefix()

private hasTestPrefix(string $functionName) : bool
Parameters
$functionName : string
Return values
bool

removeTestPrefix()

private removeTestPrefix(string $functionName) : string
Parameters
$functionName : string
Return values
string

splitUpDocBlock()

Take a one line doc block, and turn it into a multi line doc block.

private splitUpDocBlock(array<string|int, Line$lines, Tokens $tokens, int $docBlockIndex) : array<string|int, Line>
Parameters
$lines : array<string|int, Line>
$tokens : Tokens
$docBlockIndex : int
Return values
array<string|int, Line>

updateLines()

private updateLines(array<string|int, Line$lines, Tokens $tokens, int $docBlockIndex) : array<string|int, Line>
Parameters
$lines : array<string|int, Line>
$tokens : Tokens
$docBlockIndex : int
Return values
array<string|int, Line>

Search results