◆ testProvider()
Pimple\Tests\PimpleServiceProviderInterfaceTest::testProvider |
( |
| ) |
|
Definition at line 36 of file PimpleServiceProviderInterfaceTest.php.
38 $pimple =
new Container();
40 $pimpleServiceProvider =
new Fixtures\PimpleServiceProvider();
41 $pimpleServiceProvider->register($pimple);
43 $this->assertEquals(
'value', $pimple[
'param']);
44 $this->assertInstanceOf(
'Pimple\Tests\Fixtures\Service', $pimple[
'service']);
46 $serviceOne = $pimple[
'factory'];
47 $this->assertInstanceOf(
'Pimple\Tests\Fixtures\Service', $serviceOne);
49 $serviceTwo = $pimple[
'factory'];
50 $this->assertInstanceOf(
'Pimple\Tests\Fixtures\Service', $serviceTwo);
52 $this->assertNotSame($serviceOne, $serviceTwo);
◆ testProviderWithRegisterMethod()
Pimple\Tests\PimpleServiceProviderInterfaceTest::testProviderWithRegisterMethod |
( |
| ) |
|
Definition at line 55 of file PimpleServiceProviderInterfaceTest.php.
References array.
57 $pimple =
new Container();
59 $pimple->register(
new Fixtures\PimpleServiceProvider(),
array(
60 'anotherParameter' =>
'anotherValue',
63 $this->assertEquals(
'value', $pimple[
'param']);
64 $this->assertEquals(
'anotherValue', $pimple[
'anotherParameter']);
66 $this->assertInstanceOf(
'Pimple\Tests\Fixtures\Service', $pimple[
'service']);
68 $serviceOne = $pimple[
'factory'];
69 $this->assertInstanceOf(
'Pimple\Tests\Fixtures\Service', $serviceOne);
71 $serviceTwo = $pimple[
'factory'];
72 $this->assertInstanceOf(
'Pimple\Tests\Fixtures\Service', $serviceTwo);
74 $this->assertNotSame($serviceOne, $serviceTwo);
Create styles array
The data for the language used.
The documentation for this class was generated from the following file: