PropertyTest
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\Property::class
- #[CoversClass]
- \phpDocumentor\Reflection\Php\Factory\AbstractFactory::class
- #[UsesClass]
- '\phpDocumentor\Reflection\Php\Factory\PropertyIterator'
- #[UsesClass]
- '\phpDocumentor\Reflection\Php\Property'
- #[UsesClass]
- '\phpDocumentor\Reflection\Php\Visibility'
- #[UsesClass]
- '\phpDocumentor\Reflection\Php\ProjectFactoryStrategies'
- #[UsesClass]
- '\phpDocumentor\Reflection\Php\Factory\Type'
Table of Contents
Properties
- $fixture : ProjectFactoryStrategy
- $docBlockFactory : ObjectProphecy
Methods
- createContext() : ContextStack
- testCreateMultipleInOneStatement() : void
- testCreateThrowsException() : void
- testCreateWithDocBlock() : void
- testCreateWithVisibility() : void
- testMatches() : void
- visibilityProvider() : array<string|int, string|array<string|int, int>>
- setUp() : void
- assertProperty() : void
- buildPropertyMock() : Property
- performCreate() : Class_
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
ContextStacktestCreateMultipleInOneStatement()
public
testCreateMultipleInOneStatement() : void
testCreateThrowsException()
public
testCreateThrowsException() : void
testCreateWithDocBlock()
public
testCreateWithDocBlock() : void
testCreateWithVisibility()
public
testCreateWithVisibility(int $input, string $expectedVisibility) : void
Parameters
- $input : int
- $expectedVisibility : string
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
assertProperty()
private
assertProperty(Property $property, string $visibility[, string $name = 'property' ][, string|null $default = '\'MyDefault\'' ]) : void
Parameters
- $property : Property
- $visibility : string
- $name : string = 'property'
- $default : string|null = '\'MyDefault\''
buildPropertyMock()
private
buildPropertyMock(int $modifier) : Property
Parameters
- $modifier : int
Return values
PropertyperformCreate()
private
performCreate(Property $property) : Class_
Parameters
- $property : Property