Shopware\PluginCreator\Services\TemplateFileProvider\LegacyOptionFileProviderLoader::load PHP Method

load() public method

Loads all file providers based on the --legacy option.
public load ( ) : Shopware\PluginCreator\Services\TemplateFileProvider\FileProviderInterface[]
return Shopware\PluginCreator\Services\TemplateFileProvider\FileProviderInterface[]
    public function load()
    {
        if ($this->isLegacy) {
            return $this->getLegacyProvider();
        }
        return $this->getCurrentProvider();
    }

Usage Example

 public function testCurrentLoad()
 {
     $expectedProviderAmount = 11;
     $isLegacy = false;
     $loader = new LegacyOptionFileProviderLoader($isLegacy);
     $result = $loader->load();
     $this->assertEquals($expectedProviderAmount, count($result));
 }