Автор: Dariusz Rumiński (dariusz.ruminski@gmail.com)
 /**
  * Creates test data by parsing '.test' files.
  *
  * @return IntegrationCase[][]
  */
 public function getTests()
 {
     $fixturesDir = realpath(static::getFixturesDir());
     if (!is_dir($fixturesDir)) {
         throw new \UnexpectedValueException(sprintf('Given fixture dir "%s" is not a directory.', $fixturesDir));
     }
     $factory = new IntegrationCaseFactory();
     $tests = array();
     foreach (Finder::create()->files()->in($fixturesDir) as $file) {
         if ('test' !== $file->getExtension()) {
             continue;
         }
         $tests[] = array($factory->create($file->getRelativePathname(), file_get_contents($file->getRealpath())));
     }
     return $tests;
 }