/** * {@inheritdoc} */ public function execute(InputInterface $input, OutputInterface $output) { $path = $input->getArgument(self::ARG_FILE); $files = $this->locator->getFiles($path); foreach ($files as $file) { $this->collection->add($this->buildLoader($file)); } }
public function testAdd() { $loader = Mockery::mock('PhpTest\\Loader\\LoaderInterface'); $collection = new LoaderCollection(); $collection->add($loader); foreach ($collection as $_loader) { $this->assertSame($loader, $_loader); } }