JoliTypo\Tests\JoliTypoTest::testNonHTMLContent PHP 메소드

testNonHTMLContent() 공개 메소드

public testNonHTMLContent ( )
    public function testNonHTMLContent()
    {
        $fixer = new Fixer(array('Trademark', 'SmartQuotes'));
        $this->assertInstanceOf('JoliTypo\\Fixer', $fixer);
        $toFix = <<<NOT_HTML
I don't think "FosUserBundle" is a good idea for a complex application.

\tThat being said, it's an awesome way to get stuffs done(c) in a snap!
NOT_HTML;
        $fixed = <<<NOT_HTML
I don't think &ldquo;FosUserBundle&rdquo; is a good idea for a complex application.

\tThat being said, it's an awesome way to get stuffs done&copy; in a snap!
NOT_HTML;
        $this->assertEquals($fixed, $fixer->fix($toFix));
        $this->assertEquals(html_entity_decode($fixed, null, 'UTF-8'), $fixer->fixString($toFix));
        $this->assertEquals('Here is a “protip©”!', $fixer->fixString('Here is a "protip(c)"!'));
    }