@@ 123-133 (lines=11) @@ | ||
120 | /** |
|
121 | * Test that we can retrieve a service while in folder provisioning mode. |
|
122 | */ |
|
123 | public function testFolderProvisioning() |
|
124 | { |
|
125 | $serviceProvider = new ServiceProvider(array()); |
|
126 | $folders = array(realpath(__DIR__.'/../')); |
|
127 | $serviceProvider->setFolders($folders); |
|
128 | ||
129 | $this->assertInstanceOf( |
|
130 | 'NonNamespacedController', |
|
131 | $serviceProvider->getServiceInstance('NonNamespacedController') |
|
132 | ); |
|
133 | } |
|
134 | ||
135 | /** |
|
136 | * Test that we get an exception if we cannot find the service in any |
|
@@ 141-148 (lines=8) @@ | ||
138 | * @expectedException Exception |
|
139 | * @expectedExceptionMessage Controller class NonExistantController not found in any listed folder. |
|
140 | */ |
|
141 | public function testFolderProvisioningMissingService() |
|
142 | { |
|
143 | $serviceProvider = new ServiceProvider(array()); |
|
144 | $folders = array(realpath(__DIR__.'/../')); |
|
145 | $serviceProvider->setFolders($folders); |
|
146 | ||
147 | $serviceProvider->getServiceInstance('NonExistantController'); |
|
148 | } |
|
149 | } |
|
150 |