|
ILIAS
trunk Revision v13.0_alpha-62-g3b72d83f2e5
|
Bookkeeping about the mock classes that have been generated into the running process. More...
Collaboration diagram for ILIAS\Component\Dependencies\Mocks\GeneratedMockRegistry:Static Public Member Functions | |
| static | isGenerated (string $generated_fqcn) |
| static | register (string $generated_fqcn, array $return_types, AbstractLightMockBuilder $builder) |
| static | returnTypeFor (string $generated_fqcn, string $method) |
| static | defaultValueFor (object $mock, string $method) |
| Entry point for the generated mocks themselves, see {. More... | |
Static Private Attributes | |
| static array | $return_types = [] |
| static array | $builders = [] |
Bookkeeping about the mock classes that have been generated into the running process.
The state has to be process-wide: a generated class is declared in the global scope, so declaring it a second time - from whatever builder instance - is a fatal error. The registry also hands the generated mocks back to the builder that created them, so that nested mocks are built the same way the outer one was.
Definition at line 35 of file GeneratedMockRegistry.php.
|
static |
Entry point for the generated mocks themselves, see {.
Definition at line 76 of file GeneratedMockRegistry.php.
Referenced by ILIAS\Component\Dependencies\Mocks\__mockInvoke(), ILIAS\Component\Tests\Dependencies\LightMockBuilderTest\testDefaultValueForKnownMethodMatchesDirectInvocation(), and ILIAS\Component\Tests\Dependencies\LightMockBuilderTest\testDefaultValueForUnknownMethodReturnsNull().
Here is the caller graph for this function:
|
static |
| class-string | $generated_fqcn |
Definition at line 46 of file GeneratedMockRegistry.php.
Referenced by ILIAS\Component\Dependencies\Mocks\AbstractLightMockBuilder\createNormal().
Here is the caller graph for this function:
|
static |
| class-string | $generated_fqcn | |
| array<string,array<string,mixed>> | $return_types method name => normalized return type |
Definition at line 55 of file GeneratedMockRegistry.php.
References ILIAS\Component\Dependencies\Mocks\GeneratedMockRegistry\$return_types.
Referenced by ILIAS\Component\Dependencies\Mocks\AbstractLightMockBuilder\createNormal().
Here is the caller graph for this function:
|
static |
Definition at line 68 of file GeneratedMockRegistry.php.
Referenced by ILIAS\Component\Dependencies\Mocks\AbstractLightMockBuilder\defaultValueFor().
Here is the caller graph for this function:
|
staticprivate |
Definition at line 41 of file GeneratedMockRegistry.php.
|
staticprivate |
Definition at line 38 of file GeneratedMockRegistry.php.
Referenced by ILIAS\Component\Dependencies\Mocks\GeneratedMockRegistry\register().