<commit_before><?php
require_once dirname(__FILE__) . '/../Converter.php';

class ConverterTest extends PHPUnit_Framework_TestCase
{
    public function testDefaultToHtml()
    {
        $converter = new Converter();

        // lists
        $html = $converter->defaultToHtml(" - 1\n - 2");
        $this->assertEquals($html, "<ul>\n<li>1</li>\n<li>2</li>\n</ul>\n");

        // one paragraph
        $html = $converter->defaultToHtml('test');
        $this->assertEquals($html, "<p>test</p>\n");

        // two paragraphs
        $html = $converter->defaultToHtml("test\n\nline2");
        $this->assertEquals($html, "<p>test</p>\n\n<p>line2</p>\n");
    }

    public function testHeadingToHtml()
    {
        $converter = new Converter();<commit_msg>Add extra test to convert italic and bold text to HTML<commit_after><?php
require_once dirname(__FILE__) . '/../Converter.php';

class ConverterTest extends PHPUnit_Framework_TestCase
{
    public function testDefaultToHtml()
    {
        $converter = new Converter();

        // lists
        $html = $converter->defaultToHtml(" - 1\n - 2");
        $this->assertEquals($html, "<ul>\n<li>1</li>\n<li>2</li>\n</ul>\n");

        // one paragraph
        $html = $converter->defaultToHtml('test');
        $this->assertEquals($html, "<p>test</p>\n");

        // two paragraphs
        $html = $converter->defaultToHtml("test\n\nline2");
        $this->assertEquals($html, "<p>test</p>\n\n<p>line2</p>\n");

        // test with italic
        $html = $converter->defaultToHtml('test _italic_ test');
        $this->assertEquals($html, "<p>test <em>italic</em> test</p>\n");

        // test with bold
        $html = $converter->defaultToHtml('test __italic__ test');
        $this->assertEquals($html, "<p>test <strong>italic</strong> test</p>\n");
    }

    public function testHeadingToHtml()
    {
        $converter = new Converter();
{'fraction_non_alphanumeric': 0.18536071616640337, 'fraction_numerical': 0.00631911532385466, 'mean_word_length': 2.747534516765286, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 51, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4518700', 'n_tokens_mistral': 613, 'n_tokens_neox': 598, 'n_words': 109}