configProviderMock = $this->getMockForAbstractClass(ConfigProviderInterface::class); $this->model = $objectManager->getObject( CompositeConfigProvider::class, ['configProviders' => [$this->configProviderMock]] ); } public function testGetConfig() { $config = ['key' => 'value']; $this->configProviderMock->expects($this->once())->method('getConfig')->willReturn($config); $this->assertEquals($config, $this->model->getConfig()); } }