コード例 #1
0
ファイル: textTest.php プロジェクト: alerque/bibledit
    public function testEmbeddedFormattedNote()
    {
        $html_text = new Html_Text("");
        $html_text->newParagraph();
        $html_text->addText("text");
        $html_text->addNote("𐌰", "f");
        $html_text->openTextStyle(array('marker' => "add"), true, false);
        $html_text->addNoteText("add");
        $html_text->openTextStyle(array('marker' => "nd"), true, true);
        $html_text->addNoteText("nd");
        $html_text->closeTextStyle(true, false);
        $html_text->addNoteText("normal");
        $html_text->addText(".");
        $html = $html_text->getInnerHtml();
        $standard = <<<'EOD'
<p><span>text</span><a href="#note1" id="citation1" class="superscript">𐌰</a><span>.</span></p>
<div><p class="f"><a href="#citation1" id="note1">𐌰</a><span> </span><span class="add">add</span><span class="add nd">nd</span><span>normal</span></p></div>
EOD;
        $this->assertEquals(trim($standard), trim($html));
    }