public function testResolveRequirements()
 {
     $resolver = new RequirementsResolver();
     // Note: do not test every single possible resolve here.  Instead, test if a requirements can resolve
     // in the WhateverRequirementsTest.php file.  That way each can make sure it can be resolved.
     $this->assertInstanceOf('Moodlerooms\\MoodlePluginCI\\PluginValidate\\Requirements\\BlockRequirements', $resolver->resolveRequirements(new Plugin('', 'block', '', ''), 29));
     $this->assertInstanceOf('Moodlerooms\\MoodlePluginCI\\PluginValidate\\Requirements\\GenericRequirements', $resolver->resolveRequirements(new Plugin('', 'gibberish', '', ''), 29));
 }
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $this->outputHeading($output, 'Validating %s');
     list($type, $name) = $this->moodle->normalizeComponent($this->plugin->getComponent());
     $plugin = new Plugin($this->plugin->getComponent(), $type, $name, $this->plugin->directory);
     $resolver = new RequirementsResolver();
     $requirements = $resolver->resolveRequirements($plugin, $this->moodle->getBranch());
     $validate = new PluginValidate($plugin, $requirements);
     $validate->verifyRequirements();
     $output->writeln($validate->messages);
     return $validate->isValid ? 0 : 1;
 }
 public function testResolveRequirements()
 {
     $resolver = new RequirementsResolver();
     $this->assertInstanceOf('Moodlerooms\\MoodlePluginCI\\PluginValidate\\Requirements\\QuestionRequirements', $resolver->resolveRequirements(new Plugin('', 'qtype', '', ''), 29));
 }