protected function __construct(array $params)
 {
     $this->squirtServiceConfigLoader = SquirtUtil::validateParamClassWithDefault('squirtServiceConfigLoader', 'Squirt\\ServiceBuilder\\SquirtServiceConfigLoader', $params, function () use($params) {
         /*
          * Pass through parameters as these two classes are tightly
          * coupled and can use each other's configurations
          */
         return SquirtServiceConfigLoader::factory($params);
     });
     /*
      * Load any file based configuration
      */
     if (array_key_exists('fileName', $params)) {
         $serviceConfig = $this->squirtServiceConfigLoader->loadFile($params['fileName']);
         $this->serviceConfig = ServiceBuilderUtil::mergeConfig($this->serviceConfig, $serviceConfig);
     }
     /*
      * Load any literal configuration passed
      */
     if (array_key_exists('config', $params)) {
         $serviceConfig = $this->squirtServiceConfigLoader->loadConfig($params['config']);
         $this->serviceConfig = ServiceBuilderUtil::mergeConfig($this->serviceConfig, $serviceConfig);
     }
 }
 /**
  * @depends testInstantiate
  * @param SquirtServiceConfigLoader $squirtServiceConfigLoader
  */
 public function testLoadFileCircular(SquirtServiceConfigLoader $squirtServiceConfigLoader)
 {
     $configFileName = SQUIRT_TEST_DIR . join(DIRECTORY_SEPARATOR, array('', '_config', 'circular_reference_config.php'));
     /*
      * Test an invalid config file with a circular reference
      * which should throw a RuntimeException
      */
     $serviceConfig = $squirtServiceConfigLoader->loadFile($configFileName);
     $this->assertTrue(is_array($serviceConfig), 'loadFile returns an array');
 }