public function testCreateOptionsWithOptionalNull() { $configDataMock = $this->getMock('Magento\\Framework\\Config\\Data\\ConfigData', [], [], '', false); $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); $this->generator->expects($this->once())->method('createXFrameConfig')->willReturn($configDataMock); $this->generator->expects($this->once())->method('createCacheHostsConfig')->willReturn($configDataMock); $configData = $this->object->createConfig([], $this->deploymentConfig); $this->assertEquals(7, count($configData)); }