Tests for Container object
package |
Kocuj\Di\Tests\Container |
---|
addCallMethodProvider() : array
array
Data for testing standard and shared services
addHasCheckTypeProvider() : array
array
Data for testing adding and checking standard and shared services
cloneProvider() : array
array
Data for testing cloning container
servicesTypesProvider() : array
array
Data for services types
setUp()
testAdd(\Kocuj\Di\Service\ServiceType $serviceType, string $serviceId, string $decoratedServiceId)
dataProvider |
addHasCheckTypeProvider |
---|---|
string
Service identifier
string
Decorated service identifier
testAddAlreadyExists(\Kocuj\Di\Service\ServiceType $serviceType)
dataProvider |
servicesTypesProvider |
---|---|
expectedException |
\Kocuj\Di\Container\Exception |
testAddCallMethod(\Kocuj\Di\Service\ServiceType $serviceType, string $serviceId, string $decoratedServiceId, string $callMethod)
dataProvider |
addCallMethodProvider |
---|---|
string
Service identifier
string
Decorated service identifier
string
Method to call to get service
testAddWithWrongGet(\Kocuj\Di\Service\ServiceType $serviceType)
dataProvider |
servicesTypesProvider |
---|---|
expectedException |
\Kocuj\Di\Container\NotFoundException |
testCallMethodWithArguments(\Kocuj\Di\Service\ServiceType $serviceType)
dataProvider |
servicesTypesProvider |
---|---|
expectedException |
\Kocuj\Di\Container\Exception |
testCheckType(\Kocuj\Di\Service\ServiceType $serviceType, string $serviceId, string $decoratedServiceId)
dataProvider |
addHasCheckTypeProvider |
---|---|
string
Service identifier
string
Decorated service identifier
testClone(\Kocuj\Di\Service\ServiceType $serviceType, string $serviceId, string $decoratedServiceId)
dataProvider |
cloneProvider |
---|---|
string
Service identifier
string
Decorated service identifier
testGetType(\Kocuj\Di\Service\ServiceType $serviceType)
dataProvider |
servicesTypesProvider |
---|---|
expectedException |
\PHPUnit\Framework\Error\Error |
testHas(\Kocuj\Di\Service\ServiceType $serviceType, string $serviceId, string $decoratedServiceId)
dataProvider |
addHasCheckTypeProvider |
---|---|
string
Service identifier
string
Decorated service identifier
testWrongCallMethod(\Kocuj\Di\Service\ServiceType $serviceType)
dataProvider |
servicesTypesProvider |
---|---|
expectedException |
\PHPUnit\Framework\Error\Error |
serviceIdDecorator : \Kocuj\Di\ServiceIdDecorator\ServiceIdDecoratorInterface
fakeService : object
var |
---|
object
serviceFactory : \Kocuj\Di\Service\ServiceFactoryInterface