Changeset 1416
- Timestamp:
- 03/13/08 17:05:03 (6 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/ioc/stubIOCPreInterceptor.php
r1390 r1416 30 30 { 31 31 $binder = stubRegistry::get(stubBinder::REGISTRY_KEY); 32 if ( $binder === null) {32 if (null === $binder) { 33 33 $binder = new stubBinder(); 34 34 stubRegistry::set(stubBinder::REGISTRY_KEY, $binder); … … 38 38 $binder->bind('stubSession')->toInstance($session); 39 39 $binder->bind('stubResponse')->toInstance($response); 40 $binder->bind('stubInjector')->toInstance($binder->getInjector()); 40 41 stubBindingScopes::$SESSION->setSession($session); 41 42 } trunk/src/test/php/net/stubbles/ioc/stubIOCPreInterceptorTestCase.php
r1390 r1416 103 103 $response = $injector->getInstance('stubResponse'); 104 104 $this->assertSame($this->mockResponse, $response); 105 $this->assertSame($injector, $injector->getInstance('stubInjector')); 105 106 $this->assertSame($this->mockSession, stubBindingScopes::$SESSION->returnSession()); 106 107 }
