/**
  * Adds fixture tests to the suite
  *
  * @param Magento_Test_TestSuite_ModuleGroups $suite
  * @return Magento_Test_Profiler_ModuleGroupsTest
  */
 protected function _fillTests($suite)
 {
     $fileIterator = File_Iterator_Factory::getFileIterator(array(__DIR__ . '/_files/ModuleGroups'), '.php');
     // Manually make unique array of filenames, because we may get duplicate entries there
     $filenames = array();
     foreach ($fileIterator as $filename) {
         $filenames[] = (string) $filename;
     }
     $filenames = array_unique($filenames);
     // Compose test suite
     foreach ($filenames as $filename) {
         include_once $filename;
         $pathinfo = pathinfo($filename);
         $className = $pathinfo['filename'];
         $subSuite = new PHPUnit_Framework_TestSuite($className);
         $groups = $subSuite->getGroups();
         $obj = new $className();
         $suite->addTest($obj, $groups);
     }
     return $this;
 }
 public static function suite()
 {
     $suite = new Magento_Test_TestSuite_ModuleGroups(false);
     $suite->addTestFiles(File_Iterator_Factory::getFileIterator(array(__DIR__), array('Test.php')));
     return $suite;
 }