ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Pimple\Tests\PimpleServiceProviderInterfaceTest Class Reference
+ Inheritance diagram for Pimple\Tests\PimpleServiceProviderInterfaceTest:
+ Collaboration diagram for Pimple\Tests\PimpleServiceProviderInterfaceTest:

Public Member Functions

 testProvider ()
 
 testProviderWithRegisterMethod ()
 

Detailed Description

Member Function Documentation

◆ testProvider()

Pimple\Tests\PimpleServiceProviderInterfaceTest::testProvider ( )

Definition at line 36 of file PimpleServiceProviderInterfaceTest.php.

37  {
38  $pimple = new Container();
39 
40  $pimpleServiceProvider = new Fixtures\PimpleServiceProvider();
41  $pimpleServiceProvider->register($pimple);
42 
43  $this->assertEquals('value', $pimple['param']);
44  $this->assertInstanceOf('Pimple\Tests\Fixtures\Service', $pimple['service']);
45 
46  $serviceOne = $pimple['factory'];
47  $this->assertInstanceOf('Pimple\Tests\Fixtures\Service', $serviceOne);
48 
49  $serviceTwo = $pimple['factory'];
50  $this->assertInstanceOf('Pimple\Tests\Fixtures\Service', $serviceTwo);
51 
52  $this->assertNotSame($serviceOne, $serviceTwo);
53  }

◆ testProviderWithRegisterMethod()

Pimple\Tests\PimpleServiceProviderInterfaceTest::testProviderWithRegisterMethod ( )

Definition at line 55 of file PimpleServiceProviderInterfaceTest.php.

References array.

56  {
57  $pimple = new Container();
58 
59  $pimple->register(new Fixtures\PimpleServiceProvider(), array(
60  'anotherParameter' => 'anotherValue',
61  ));
62 
63  $this->assertEquals('value', $pimple['param']);
64  $this->assertEquals('anotherValue', $pimple['anotherParameter']);
65 
66  $this->assertInstanceOf('Pimple\Tests\Fixtures\Service', $pimple['service']);
67 
68  $serviceOne = $pimple['factory'];
69  $this->assertInstanceOf('Pimple\Tests\Fixtures\Service', $serviceOne);
70 
71  $serviceTwo = $pimple['factory'];
72  $this->assertInstanceOf('Pimple\Tests\Fixtures\Service', $serviceTwo);
73 
74  $this->assertNotSame($serviceOne, $serviceTwo);
75  }
Create styles array
The data for the language used.

The documentation for this class was generated from the following file: