function testregisterComponentImplementationWithIncFileName()
 {
     $pico = new DefaultPicoContainer();
     $pico->registerComponentImplementationWithIncFileName('any.filename.inc.php', 'AnyNonIncludedClass');
     $ca = $pico->getComponentAdapter('AnyNonIncludedClass');
     $this->assertIsA($ca, 'LazyIncludingComponentAdapter');
 }
Esempio n. 2
0
 function testIncludeFileNameNotDefinedRegistrationException()
 {
     $pico = new DefaultPicoContainer();
     try {
         $pico->registerComponentImplementationWithIncFileName('', 'AnyNonIncludedClass');
         $this->fail();
     } catch (IncludeFileNameNotDefinedRegistrationException $e) {
         $this->pass();
     }
 }