Aggregate Container (FastForward\Container\Tests\AggregateContainer)
- Has returns true for alias and class bindings
- Has returns false for unknown key
- Get returns self for alias and class bindings
- Has returns true if sub container has entry
- Get returns resolved entry from sub container
- Get skips containers throwing not found exception
- Get skips containers throwing standard interfaces
- Get throws when no container can resolve
- Append adds container at the end
- Prepend adds container at the beginning
- Get uses internal cache after first resolution
Aggregate Service Provider (FastForward\Container\Tests\ServiceProvider\AggregateServiceProvider)
- Get factories merges all providers and includes self
- Get extensions merges all providers and composes same key
- Get extensions throws if extension is not callable
Alias Factory (FastForward\Container\Tests\Factory\AliasFactory)
- Invoke resolves aliased service from container
- Get returns same instance for same alias
- Get returns new instance for different aliases
Array Service Provider (FastForward\Container\Tests\ServiceProvider\ArrayServiceProvider)
- Implements service provider interface
- Returns given factories
- Returns given extensions
- Returns empty arrays by default
Autowire Container (FastForward\Container\Tests\AutowireContainer)
- Get delegates to internal container
- Has returns false when service not present
- Has returns false when resolution fails
- Has returns true when service is resolvable
- Autowire container accepts aggregate container directly
Callable Factory (FastForward\Container\Tests\Factory\CallableFactory)
- Invoke will return provided callable returns
- Closure receives container dependencies as argument
- Invoke will throw runtime exception if parameter is not a class
Container Exception (FastForward\Container\Tests\Exception\ContainerException)
- For invalid service will return proper exception
Container Function (FastForward\Container\Tests\ContainerFunction)
- Returns autowire container wrapping aggregate
- Accepts psr container as initializer
- Accepts service provider as initializer
- Accepts config interface as initializer
- Accepts instantiable string
- Throws for unsupported initializer
- Config container with nested initializers
- Container skips throwable thrown by config container
Invalid Argument Exception (FastForward\Container\Tests\Exception\InvalidArgumentException)
- For unsupported initializer returns exception with correct message
- For unsupported initializer with object
- For unsupported initializer with scalar
Invokable Factory (FastForward\Container\Tests\Factory\InvokableFactory)
- Invoke instantiates class without arguments
- Invoke instantiates class with arguments
- Invoke resolves string arguments from container
Method Factory (FastForward\Container\Tests\Factory\MethodFactory)
- Invoke instance method
- Invoke static method
- Invoke resolves arguments from container
- Invoke throws for non public method
- Invoke will construct target if container does not provide
- Constructor dependency is resolved from container
Not Found Exception (FastForward\Container\Tests\Exception\NotFoundException)
- For service i d returns expected message
Runtime Exception (FastForward\Container\Tests\Exception\RuntimeException)
- For non callable extension returns proper exception
- For non public method returns proper exception
- For invalid parameter type returns proper exception
Service Factory (FastForward\Container\Tests\Factory\ServiceFactory)
- Invoke returns same instance
Service Provider Container (FastForward\Container\Tests\ServiceProviderContainer)
- Has returns true for cached service
- Has returns true for existing factory
- Has returns false for unknown id
- Get returns service from factory
- Get applies extension if available
- Get throws not found exception for missing factory
- Get wraps container exception
- Get will return from cache when serice already resolved
- Apply service extension by class name
- Apply service extension by id and class
- Apply service ignores non callable extensions