PHP Class PhpBench\Tests\Unit\Registry\RegistryTest

Inheritance: extends PHPUnit_Framework_TestCase
Exibir arquivo Open project: dantleech/phpbench Class Usage Examples

Protected Properties

Property Type Description
$container
$registry
$service1
$service2

Public Methods

Method Description
setUp ( )
testDefaultGet ( ) It should return a default service if no argument is given to get().
testDefaultGetNoDefault ( ) It should throw an exception if no argument given to get() and no default is defined.
testExceptionServivceNotExist ( ) It should throw an exception if a service does not exist.
testRegisterAlreadyRegistered ( ) It should throw an exception if setting an already set service.
testRegisterRetrieveService ( ) It should register a service It should retrieve a service It should retrieve a service from the container only once.
testSetAndRetrieve ( ) It should set and retrieve services.

Method Details

setUp() public method

public setUp ( )

testDefaultGet() public method

It should return a default service if no argument is given to get().
public testDefaultGet ( )

testDefaultGetNoDefault() public method

It should throw an exception if no argument given to get() and no default is defined.

testExceptionServivceNotExist() public method

It should throw an exception if a service does not exist.

testRegisterAlreadyRegistered() public method

It should throw an exception if setting an already set service.

testRegisterRetrieveService() public method

It should register a service It should retrieve a service It should retrieve a service from the container only once.

testSetAndRetrieve() public method

It should set and retrieve services.
public testSetAndRetrieve ( )

Property Details

$container protected_oe property

protected $container

$registry protected_oe property

protected $registry

$service1 protected_oe property

protected $service1

$service2 protected_oe property

protected $service2