ClassConstantTest
extends TestCase
in package
uses
ProphecyTrait
FinalYes
Base test case for all strategies, to be sure that they check if the can handle objects before handeling them.
Attributes
- #[CoversClass]
- \phpDocumentor\Reflection\Php\Factory\ClassConstant::class
- #[CoversClass]
- \phpDocumentor\Reflection\Php\Factory\AbstractFactory::class
- #[UsesClass]
- '\phpDocumentor\Reflection\Php\Factory\ClassConstantIterator'
- #[UsesClass]
- '\phpDocumentor\Reflection\Php\ProjectFactoryStrategies'
- #[UsesClass]
- '\phpDocumentor\Reflection\Php\Constant'
- #[UsesClass]
- '\phpDocumentor\Reflection\Php\Visibility'
Table of Contents
Properties
- $fixture : ProjectFactoryStrategy
- $docBlockFactory : ObjectProphecy
Methods
- createContext() : ContextStack
- testCreateForEnum() : void
- testCreateForInterface() : void
- testCreateForTrait() : void
- testCreateThrowsException() : void
- testCreateWithDocBlock() : void
- testCreateWithVisibility() : void
- testMatches() : void
- visibilityProvider() : array<string|int, string|array<string|int, 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
ContextStacktestCreateForEnum()
public
testCreateForEnum() : void
testCreateForInterface()
public
testCreateForInterface() : void
testCreateForTrait()
public
testCreateForTrait() : void
testCreateThrowsException()
public
testCreateThrowsException() : void
testCreateWithDocBlock()
public
testCreateWithDocBlock() : void
testCreateWithVisibility()
public
testCreateWithVisibility(int $input, string $expectedVisibility[, bool $isFinal = false ]) : void
Parameters
- $input : int
- $expectedVisibility : string
- $isFinal : bool = false
Attributes
- #[DataProvider]
- 'visibilityProvider'
testMatches()
public
testMatches() : void
visibilityProvider()
public
static visibilityProvider() : array<string|int, string|array<string|int, int>>
Return values
array<string|int, string|array<string|int, int>>setUp()
protected
setUp() : void
assertConstant()
private
assertConstant(Constant $constant, string $visibility) : void
Parameters
- $constant : Constant
- $visibility : string
buildConstantIteratorStub()
private
buildConstantIteratorStub([int $modifier = Class_::MODIFIER_PUBLIC ]) : ClassConst
Parameters
- $modifier : int = Class_::MODIFIER_PUBLIC
Return values
ClassConstperformCreate()
private
performCreate(ClassConst $constantStub) : Class_
Parameters
- $constantStub : ClassConst
Return values
Class_performCreateWith()
private
performCreateWith(ClassConst $constantStub, Element $parent) : Element
Parameters
- $constantStub : ClassConst
- $parent : Element