/** * @covers Syllable::splitText */ public function testCaseInsensitivity() { $this->object->setHyphen('-'); $this->object->setLanguage('en-us'); $this->assertEquals(array('IN', 'EX', 'PLIC', 'A', 'BLE'), $this->object->splitText('INEXPLICABLE')); $this->assertEquals(array('in', 'ex', 'plic', 'a', 'ble'), $this->object->splitText('inexplicable')); }
</div> </form> <hr/> <div class="example"> <h2>Source</h2> <h5>Without hyphens</h5> <?php echo nl2br($source); ?> </div> <div class="example"> <h2>Soft-hyphens</h2> <h5>&shy; entities</h5> <?php $syllable->setHyphen(new Syllable_Hyphen_Soft()); echo nl2br($syllable->hyphenateText($source)); ?> </div> <div class="example"> <h2>Hyphens</h2> <h5>All hyphen locations</h5> <?php $syllable->setHyphen('<span class="debug-hyphen">-</span>'); echo nl2br($syllable->hyphenateText($source)); ?> </div> <div class="example"> <h2>Zero-width spaces</h2>