public function testValidManagerWhenInvalidTestClassMethod()
 {
     $testClass = $this->classManager->getTestClass();
     $testClassMethods = $testClass->getMethods();
     $testClassMethods->add(new TestMethodManager($this->classManager));
     // broken test class method
     $testClass->setMethods($testClassMethods);
     $errors = $this->getValidator()->validate($this->classManager);
     $this->assertEquals(1, $errors->count());
 }
 /**
  * Dump TestClass to file
  *
  * @param OutputInterface $output
  * @param ClassManager $classManager
  * @param boolean $onlySimulate
  * @return
  */
 protected function processTestClass(OutputInterface $output, ClassManager $classManager, $onlySimulate = false)
 {
     if (false == $classManager->hasTestClass()) {
         return;
     }
     $testClassManager = $classManager->getTestClass();
     if (false == $onlySimulate) {
         $filesManager = $this->getFilesManager();
         $filesManager->dump($testClassManager);
     }
     $output->writeln('<question>Processed: ' . $classManager->getTestClass()->getNamespace() . '</question>');
     $this->outputProcessMethods($output, $testClassManager);
     if (false == $testClassManager->getMethods()->isEmpty()) {
         $output->writeln(sprintf('<comment>Implement missing assertions in %s</comment>', $testClassManager->getNamespace()));
     }
     $output->writeln('');
 }