SmartPunctFunctionalTest.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. * Original code based on the CommonMark JS reference parser (http://bitly.com/commonmark-js)
  9. * - (c) John MacFarlane
  10. *
  11. * For the full copyright and license information, please view the LICENSE
  12. * file that was distributed with this source code.
  13. */
  14. namespace League\CommonMark\Tests\Functional\Extension\SmartPunct;
  15. use League\CommonMark\Environment\Environment;
  16. use League\CommonMark\Extension\CommonMark\CommonMarkCoreExtension;
  17. use League\CommonMark\Extension\SmartPunct\SmartPunctExtension;
  18. use League\CommonMark\MarkdownConverter;
  19. use League\CommonMark\Tests\Functional\AbstractSpecTest;
  20. /**
  21. * Tests the parser against the CommonMark spec
  22. */
  23. final class SmartPunctFunctionalTest extends AbstractSpecTest
  24. {
  25. protected function setUp(): void
  26. {
  27. $environment = new Environment();
  28. $environment->addExtension(new CommonMarkCoreExtension());
  29. $environment->addExtension(new SmartPunctExtension());
  30. $this->converter = new MarkdownConverter($environment);
  31. }
  32. protected function getFileName(): string
  33. {
  34. return __DIR__ . '/../../../../vendor/commonmark/commonmark.js/test/smart_punct.txt';
  35. }
  36. }