/** * @param OutputInterface $output * @param array $files * * @throws ComposerJsonNotCommittedException */ public function run(OutputInterface $output, array $files) { if ($this->isEnabled()) { $this->composerFilesValidator->setOutput($output); $this->composerFilesValidator->setFiles($files); $this->composerFilesValidator->validate(); } }
/** * @test */ public function validateSuccessfully() { $data = array(array('file1'), array('composer.json', 'composer.lock')); foreach ($data as $files) { $this->composerFilesValidator->setOutput($this->outuputInterface); $this->composerFilesValidator->setFiles($files); $this->assertNull($this->composerFilesValidator->validate()); } }