create() public static method

Get new instance of the ConfigManager
public static create ( null $config = null ) : static
$config null
return static
 /**
  * @inheritdoc
  */
 public function setUp()
 {
     parent::setUp();
     // $testConfig array
     $testConfig = (include __DIR__ . '/../config/config.php');
     $this->configManager = ConfigManager::create($testConfig);
     $this->basePath = realpath(__DIR__ . '/..');
     $this->storagePath = realpath(__DIR__ . '/../storage');
     $this->fileSystem = new FileSystem($this->configManager->get(), $this->basePath, $this->storagePath);
 }
 /**
  * Register the service provider.
  *
  * @return mixed
  */
 public function register()
 {
     $this->app->bind('Adapters/AdapterInterface', 'Adapters/LaravelAdapter');
     // Main class register
     $this->app['laravel-gettext'] = $this->app->share(function ($app) {
         $configuration = Config\ConfigManager::create();
         $fileSystem = new FileSystem($configuration->get(), app_path(), storage_path());
         $gettext = new Gettext($configuration->get(), new Session\SessionHandler($configuration->get()->getSessionIdentifier()), new Adapters\LaravelAdapter(), $fileSystem);
         return new LaravelGettext($gettext);
     });
     // Auto alias
     $this->app->booting(function () {
         $loader = \Illuminate\Foundation\AliasLoader::getInstance();
         $loader->alias('LaravelGettext', 'Xinax\\LaravelGettext\\Facades\\LaravelGettext');
     });
     $this->registerCommands();
 }
 public function setUp()
 {
     parent::setUp();
     // Config
     $testConfig = (include __DIR__ . '/../config/config.php');
     $config = ConfigManager::create($testConfig);
     // Session handler
     $session = m::mock('Xinax\\LaravelGettext\\Session\\SessionHandler');
     $session->shouldReceive('get')->andReturn('en_US');
     $session->shouldReceive('set')->with('en_US');
     // Framework adapter
     $adapter = m::mock('Xinax\\LaravelGettext\\Adapters\\LaravelAdapter');
     $adapter->shouldReceive('setLocale')->with('en_US');
     $adapter->shouldReceive('getApplicationPath')->andReturn(dirname(__FILE__));
     // FileSystem module
     $fileSystem = m::mock('Xinax\\LaravelGettext\\FileSystem');
     $fileSystem->shouldReceive('filesystemStructure')->andReturn(true);
     $fileSystem->shouldReceive('getDomainPath')->andReturn('path');
     $this->gettext = new Gettext($config->get(), $session, $adapter, $fileSystem);
 }
 /**
  * Register the service provider.
  *
  * @return mixed
  */
 public function register()
 {
     $configuration = Config\ConfigManager::create();
     $this->app->bind('Adapters/AdapterInterface', $configuration->get()->getAdapter());
     // Main class register
     $this->app['laravel-gettext'] = $this->app->share(function ($app) use($configuration) {
         $fileSystem = new FileSystem($configuration->get(), app_path(), storage_path());
         if ('symfony' == $configuration->get()->getHandler()) {
             // symfony translator implementation
             $translator = new Translators\Symfony($configuration->get(), new Adapters\LaravelAdapter(), $fileSystem);
         } else {
             // GNU/Gettext php extension
             $translator = new Translators\Gettext($configuration->get(), new Adapters\LaravelAdapter(), $fileSystem);
         }
         return new LaravelGettext($translator);
     });
     include_once __DIR__ . '/Support/helpers.php';
     // Alias
     $this->app->booting(function () {
         $loader = \Illuminate\Foundation\AliasLoader::getInstance();
         $loader->alias('LaravelGettext', 'Xinax\\LaravelGettext\\Facades\\LaravelGettext');
     });
     $this->registerCommands();
 }
 /**
  * Prepares the package environment for gettext commands
  * 
  * @return void
  */
 protected function prepare()
 {
     $configManager = ConfigManager::create();
     $this->fileSystem = new FileSystem($configManager->get(), app_path(), storage_path());
     $this->configuration = $configManager->get();
 }