| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 9 | function testBootstrapManager() |
||
|
|
|||
| 10 | { |
||
| 11 | $manager = new BootstrapManager(); |
||
| 12 | $testBootstrapAwareObject = new TestBootstrapAwareObject(); |
||
| 13 | $testBootstrapAwareObject->setBootstrapCurrator($manager->getBootstrapCurrator()); |
||
| 14 | |||
| 15 | $testBoot1 = new TestBoot('/path/to/boot1', '1.2.3', ['code', 'database', 'configuration']); |
||
| 16 | $testBoot2 = new TestBoot('/path/to/boot2', '3.4.5', ['code', 'database', 'configuration']); |
||
| 17 | |||
| 18 | $manager->add($testBoot1); |
||
| 19 | $manager->add($testBoot2); |
||
| 20 | |||
| 21 | $bootstrapObject = $manager->selectBootstrap('/path/to/boot1'); |
||
| 22 | |||
| 23 | $this->assertNotNull($bootstrapObject, 'Could not select a bootstrap object'); |
||
| 24 | $this->assertEquals('1.2.3', $testBootstrapAwareObject->getBootstrap()->getFrameworkVersion()); |
||
| 25 | } |
||
| 26 | } |
||
| 27 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.