LocalDataTest.php 1006 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. declare(strict_types=1);
  3. /*
  4. * This file is part of the league/commonmark package.
  5. *
  6. * (c) Colin O'Dell <colinodell@gmail.com>
  7. *
  8. * For the full copyright and license information, please view the LICENSE
  9. * file that was distributed with this source code.
  10. */
  11. namespace League\CommonMark\Tests\Functional;
  12. use League\CommonMark\CommonMarkConverter;
  13. use League\CommonMark\ConverterInterface;
  14. /**
  15. * Tests the parser against locally-stored examples
  16. *
  17. * This is particularly useful for testing minor variations allowed by the spec
  18. * or small regressions not tested by the spec.
  19. */
  20. final class LocalDataTest extends AbstractLocalDataTest
  21. {
  22. /**
  23. * @param array<string, mixed> $config
  24. */
  25. protected function createConverter(array $config = []): ConverterInterface
  26. {
  27. return new CommonMarkConverter($config);
  28. }
  29. /**
  30. * {@inheritDoc}
  31. */
  32. public function dataProvider(): iterable
  33. {
  34. yield from $this->loadTests(__DIR__ . '/data');
  35. }
  36. }