| | 248 | |
|---|
| | 249 | /** |
|---|
| | 250 | * test implicit bindings |
|---|
| | 251 | */ |
|---|
| | 252 | public function testImplicitBinding() |
|---|
| | 253 | { |
|---|
| | 254 | $binder = new stubBinder(); |
|---|
| | 255 | $injector = $binder->getInjector(); |
|---|
| | 256 | |
|---|
| | 257 | $goodyear = $injector->getInstance('stubInjectorTestCase_Goodyear'); |
|---|
| | 258 | $this->assertIsA($goodyear, 'stubInjectorTestCase_Goodyear'); |
|---|
| | 259 | } |
|---|
| | 260 | |
|---|
| | 261 | /** |
|---|
| | 262 | * test implicit bindings as a dependency |
|---|
| | 263 | */ |
|---|
| | 264 | public function testImplicitBindingAsDependency() |
|---|
| | 265 | { |
|---|
| | 266 | $binder = new stubBinder(); |
|---|
| | 267 | $injector = $binder->getInjector(); |
|---|
| | 268 | |
|---|
| | 269 | $obj = $injector->getInstance('stubInjectorTestCase_ImplicitDependency'); |
|---|
| | 270 | $this->assertIsA($obj, 'stubInjectorTestCase_ImplicitDependency'); |
|---|
| | 271 | $this->assertIsA($obj->getGoodyear(), 'stubInjectorTestCase_Goodyear'); |
|---|
| | 272 | } |
|---|