示例#1
0
 /**
  * @test
  * @since  5.0.0
  */
 public function runtimeIsInitializedAfterFirstInstanceCreation()
 {
     new Runtime();
     assertTrue(Runtime::initialized());
 }
示例#2
0
 /**
  * creates list of bindings from given class
  *
  * @internal  must not be used by applications
  * @param   string  $className    full qualified class name of class to create an instance of
  * @return  \stubbles\ioc\module\BindingModule[]
  * @since   1.3.0
  */
 protected static function getBindingsForApp(string $className) : array
 {
     $bindings = method_exists($className, '__bindings') ? $className::__bindings() : [];
     if (!Runtime::initialized()) {
         $bindings[] = static::runtime();
     }
     return $bindings;
 }