PHP Class Polyglot\TestCases\ContainerTestCase

Inheritance: extends PHPUnit_Framework_TestCas\PHPUnit_Framework_TestCase
Datei anzeigen Open project: anahkiasen/polyglot Class Usage Examples

Protected Properties

Property Type Description
$app Illuminate\Container\Container The current IoC Container

Public Methods

Method Description
__get ( string $key ) : object Get an instance from the Container
__set ( string $key, object $value ) Set an instance on the container
setUp ( ) Set up the tests
tearDown ( ) : void Clean up mocked instances

Protected Methods

Method Description
mockConfig ( $options = [] ) : Mockery Mock Config
mockRequest ( $segment = 'fr' ) : Mockery Mock Request
mockUrl ( Request $request ) : UrlGenerator Get a new instance of UrlGenerator with a mock Request

Method Details

__get() public method

Get an instance from the Container
public __get ( string $key ) : object
$key string
return object

__set() public method

Set an instance on the container
public __set ( string $key, object $value )
$key string
$value object

mockConfig() protected method

Mock Config
protected mockConfig ( $options = [] ) : Mockery
return Mockery

mockRequest() protected method

Mock Request
protected mockRequest ( $segment = 'fr' ) : Mockery
return Mockery

mockUrl() protected method

Get a new instance of UrlGenerator with a mock Request
protected mockUrl ( Request $request ) : UrlGenerator
$request Request
return Polyglot\Services\UrlGenerator

setUp() public method

Set up the tests
public setUp ( )

tearDown() public method

Clean up mocked instances
public tearDown ( ) : void
return void

Property Details

$app protected_oe property

The current IoC Container
protected Container,Illuminate\Container $app
return Illuminate\Container\Container