ClassConstantTest
extends TestCase
in package
Uses
ProphecyTrait
Base test case for all strategies, to be sure that they check if the can handle objects before handeling them.
Tags
Table of Contents
- $fixture : ProjectFactoryStrategy
- $docBlockFactory : ObjectProphecy
- createContext() : ContextStack
- testCreateForEnum() : void
- testCreateForInterface() : void
- testCreateForTrait() : void
- testCreateThrowsException() : void
- testCreateWithDocBlock() : void
- testCreateWithVisibility() : void
- testMatches() : void
- visibilityProvider() : array<string|int, string|int[]>
- setUp() : void
- assertConstant() : void
- buildConstantIteratorStub() : ClassConst
- performCreate() : Class_
- performCreateWith() : Element
Properties
$fixture
protected
ProjectFactoryStrategy
$fixture
$docBlockFactory
private
ObjectProphecy
$docBlockFactory
Methods
createContext()
public
static createContext([Context|null $typeContext = null ]) : ContextStack
Parameters
- $typeContext : Context|null = null
Return values
ContextStack —testCreateForEnum()
public
testCreateForEnum() : void
Return values
void —testCreateForInterface()
public
testCreateForInterface() : void
Return values
void —testCreateForTrait()
public
testCreateForTrait() : void
Return values
void —testCreateThrowsException()
public
testCreateThrowsException() : void
Tags
Return values
void —testCreateWithDocBlock()
public
testCreateWithDocBlock() : void
Return values
void —testCreateWithVisibility()
public
testCreateWithVisibility(int $input, string $expectedVisibility[, bool $isFinal = false ]) : void
Parameters
- $input : int
- $expectedVisibility : string
- $isFinal : bool = false
Tags
Return values
void —testMatches()
public
testMatches() : void
Return values
void —visibilityProvider()
public
visibilityProvider() : array<string|int, string|int[]>
Return values
array<string|int, string|int[]> —setUp()
protected
setUp() : void
Return values
void —assertConstant()
private
assertConstant(Constant $constant, string $visibility) : void
Parameters
- $constant : Constant
- $visibility : string
Return values
void —buildConstantIteratorStub()
private
buildConstantIteratorStub([int $modifier = ClassNode::MODIFIER_PUBLIC ]) : ClassConst
Parameters
- $modifier : int = ClassNode::MODIFIER_PUBLIC
Return values
ClassConst —performCreate()
private
performCreate(ClassConst $constantStub) : Class_
Parameters
- $constantStub : ClassConst
Return values
Class_ —performCreateWith()
private
performCreateWith(ClassConst $constantStub, Element $parent) : Element
Parameters
- $constantStub : ClassConst
- $parent : Element