function testTextShouldNotBeRed() { $converter = new JoshRibakoff_Note_RTFToHTML(); $converter->setColorTable(array('000000', 'FF0000', 'FFFF00')); $output = $converter->convert('\\cf1red\\b\\cf2yellow bold'); $expected = '<span style="color:#FF0000">red<b></b></span><b><span style="color:#FFFF00">yellow bold</span></b>'; $this->assertEquals($expected, $output, 'should not be red'); }
/** Formats the note represented by this object as HTML */ function formatHTML() { $converter = new JoshRibakoff_Note_RTFToHTML(); $converter->setColorTable($this->colorTable()); return $converter->convert(trim($this->rtf_text)); }