Documentation

ProjectFactoryTest extends MockeryTestCase
in package
uses ProphecyTrait

FinalYes
Attributes
#[CoversClass]
\phpDocumentor\Reflection\Php\ProjectFactory::class
#[UsesClass]
'\phpDocumentor\Reflection\Php\Project'
#[UsesClass]
'\phpDocumentor\Reflection\Php\Namespace_'
#[UsesClass]
'\phpDocumentor\Reflection\Php\Class_'
#[UsesClass]
'\phpDocumentor\Reflection\Php\Interface_'
#[UsesClass]
'\phpDocumentor\Reflection\Php\Trait_'
#[UsesClass]
'\phpDocumentor\Reflection\Php\Constant'
#[UsesClass]
'\phpDocumentor\Reflection\Php\File'
#[UsesClass]
'\phpDocumentor\Reflection\Php\Function_'
#[UsesClass]
'\phpDocumentor\Reflection\Php\ProjectFactoryStrategies'
#[UsesClass]
'\phpDocumentor\Reflection\Php\Visibility'
#[UsesClass]
'\phpDocumentor\Reflection\Middleware\ChainFactory'
#[UsesClass]
'\phpDocumentor\Reflection\Php\Factory\Property'
#[UsesClass]
'\phpDocumentor\Reflection\Php\Factory\Method'
#[UsesClass]
'\phpDocumentor\Reflection\Php\Factory\Class_'
#[UsesClass]
'\phpDocumentor\Reflection\Php\Factory\Interface_'
#[UsesClass]
'\phpDocumentor\Reflection\Php\Factory\ClassConstant'
#[UsesClass]
'\phpDocumentor\Reflection\Php\Factory\Define'
#[UsesClass]
'\phpDocumentor\Reflection\Php\Factory\GlobalConstant'
#[UsesClass]
'\phpDocumentor\Reflection\Php\Factory\Trait_'
#[UsesClass]
'\phpDocumentor\Reflection\Php\Factory\File'
#[UsesClass]
'\phpDocumentor\Reflection\Php\NodesFactory'

Table of Contents

Methods

testCreate()  : void
testCreateProjectFromFileWithNamespacedClass()  : void
testCreateThrowsExceptionWhenStrategyNotFound()  : void
testCreatingAnInstanceInstantiatesItWithTheRecommendedStrategies()  : void
testNamespaceSpreadOverMultipleFiles()  : void
testSingleFileMultipleNamespaces()  : void
testWithNamespacedConstant()  : void
testWithNamespacedFunction()  : void
testWithNamespacedInterface()  : void
testWithNamespacedTrait()  : void
fetchNamespacesFromMultipleFiles()  : array<string|int, Namespace_>
Uses the ProjectFactory to create a Project and returns the namespaces created by the factory.
fetchNamespacesFromSingleFile()  : array<string|int, Namespace_>
Uses the ProjectFactory to create a Project and returns the namespaces created by the factory.

Methods

testCreateProjectFromFileWithNamespacedClass()

public testCreateProjectFromFileWithNamespacedClass() : void

testCreateThrowsExceptionWhenStrategyNotFound()

public testCreateThrowsExceptionWhenStrategyNotFound() : void

testCreatingAnInstanceInstantiatesItWithTheRecommendedStrategies()

public testCreatingAnInstanceInstantiatesItWithTheRecommendedStrategies() : void

testNamespaceSpreadOverMultipleFiles()

public testNamespaceSpreadOverMultipleFiles() : void

testSingleFileMultipleNamespaces()

public testSingleFileMultipleNamespaces() : void

fetchNamespacesFromMultipleFiles()

Uses the ProjectFactory to create a Project and returns the namespaces created by the factory.

private fetchNamespacesFromMultipleFiles(array<string|int, File$files) : array<string|int, Namespace_>
Parameters
$files : array<string|int, File>
Tags
throws
Exception
Return values
array<string|int, Namespace_>

Namespaces of the project

fetchNamespacesFromSingleFile()

Uses the ProjectFactory to create a Project and returns the namespaces created by the factory.

private fetchNamespacesFromSingleFile(File $file) : array<string|int, Namespace_>
Parameters
$file : File
Tags
throws
Exception
Return values
array<string|int, Namespace_>

Namespaces of the project


        
On this page

Search results