added helper functions which are injected into every test

feature/tests
Michael Ochmann 3 years ago
parent edafdd15ea
commit ec4169ea22
  1. 12
      tests/util.php

@ -0,0 +1,12 @@
<?php declare(strict_types=1);
use parkdown\Parkdown;
function createTest(string $source, string $target) : array {
$strip = function(string $string) : string {
return trim(preg_replace("/\s+/", "", $string));
};
$parkdown = new Parkdown($source);
return [$strip($target), $strip($parkdown->html())];
}
Loading…
Cancel
Save