2010-05-12 01:25:34 +02:00
|
|
|
<?php
|
|
|
|
|
2011-03-12 18:47:26 +01:00
|
|
|
namespace Knplabs\Bundle\MarkdownBundle\Tests;
|
2010-05-12 01:25:34 +02:00
|
|
|
|
2011-03-12 18:47:26 +01:00
|
|
|
use Knplabs\Bundle\MarkdownBundle\Parser\MarkdownParser as Parser;
|
2010-05-12 01:25:34 +02:00
|
|
|
|
2011-03-12 18:47:26 +01:00
|
|
|
use Knplabs\Bundle\MarkdownBundle\Parser\Preset as Preset;
|
2010-05-12 01:25:34 +02:00
|
|
|
|
|
|
|
class PresetTest extends \PHPUnit_Framework_TestCase
|
|
|
|
{
|
|
|
|
|
|
|
|
public function testMax()
|
|
|
|
{
|
|
|
|
$parser = new Preset\Max();
|
|
|
|
|
|
|
|
$this->assertEquals($this->getHtml(), $parser->transform($this->getText()));
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testMedium()
|
|
|
|
{
|
|
|
|
$parser = new Preset\Medium();
|
|
|
|
|
|
|
|
$this->assertEquals($this->getHtml(), $parser->transform($this->getText()));
|
|
|
|
}
|
|
|
|
|
|
|
|
// public function testMin()
|
|
|
|
// {
|
|
|
|
// $parser = new Preset\Min();
|
|
|
|
//
|
|
|
|
// $this->assertEquals($this->getHtml(), $parser->transform($this->getText()));
|
|
|
|
// }
|
|
|
|
|
|
|
|
// public function testLight()
|
|
|
|
// {
|
|
|
|
// $parser = new Preset\Light();
|
|
|
|
//
|
|
|
|
// $this->assertEquals($this->getHtml(), $parser->transform($this->getText()));
|
|
|
|
// }
|
|
|
|
|
|
|
|
protected function getText()
|
|
|
|
{
|
|
|
|
return file_get_contents(__DIR__.'/fixtures/big_text.markdown');
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function getHtml()
|
|
|
|
{
|
|
|
|
return file_get_contents(__DIR__.'/fixtures/big_text.html');
|
|
|
|
}
|
2010-07-22 11:20:38 +02:00
|
|
|
}
|