public function testCreateOptionsWithOptionalNull()
 {
     $configDataMock = $this->getMock('Magento\\Framework\\Config\\Data\\ConfigData', [], [], '', false);
     $this->generator->expects($this->once())->method('createInstallConfig')->willReturn($configDataMock);
     $this->generator->expects($this->once())->method('createCryptConfig')->willReturn($configDataMock);
     $this->generator->expects($this->once())->method('createSessionConfig')->willReturn($configDataMock);
     $this->generator->expects($this->once())->method('createDefinitionsConfig')->willReturn(null);
     $this->generator->expects($this->once())->method('createDbConfig')->willReturn($configDataMock);
     $this->generator->expects($this->once())->method('createResourceConfig')->willReturn($configDataMock);
     $configData = $this->object->createConfig([], $this->deploymentConfig);
     $this->assertEquals(5, count($configData));
 }
 /**
  * {@inheritdoc}
  */
 public function createConfig(array $data, DeploymentConfig $deploymentConfig)
 {
     $configData = [];
     $configData[] = $this->configGenerator->createInstallConfig($deploymentConfig);
     $configData[] = $this->configGenerator->createCryptConfig($data, $deploymentConfig);
     $configData[] = $this->configGenerator->createSessionConfig($data);
     $definitionConfig = $this->configGenerator->createDefinitionsConfig($data);
     if (isset($definitionConfig)) {
         $configData[] = $definitionConfig;
     }
     $configData[] = $this->configGenerator->createDbConfig($data);
     $configData[] = $this->configGenerator->createResourceConfig();
     return $configData;
 }
 public function testCreateResourceConfig()
 {
     $returnValue = $this->configGeneratorObject->createResourceConfig();
     $this->assertEquals(ConfigFilePool::APP_CONFIG, $returnValue->getFileKey());
     $this->assertEquals(['resource' => ['default_setup' => ['connection' => 'default']]], $returnValue->getData());
 }