public function testSettingFilters() { $h = new h\Hyphenator(); $h->getOptions()->setFilters(array()); $f = new h\Filter\SimpleFilter(); $this->assertInstanceof('\\Org\\Heigl\\Hyphenator\\Filter\\FilterRegistry', $h->getFilters()); $this->assertEquals(0, $h->getFilters()->count()); $this->assertSame($h, $h->addFilter($f)); $this->assertInstanceof('\\Org\\Heigl\\Hyphenator\\Filter\\FilterRegistry', $h->getFilters()); $this->assertEquals(1, $h->getFilters()->count()); $this->assertSame($f, $h->getFilters()->getFilterWithKey(0)); $this->assertSame($h, $h->addFilter('CustomMarkup')); $this->assertInstanceof('\\Org\\Heigl\\Hyphenator\\Filter\\FilterRegistry', $h->getFilters()); $this->assertEquals(2, $h->getFilters()->count()); $this->assertInstanceof('\\Org\\Heigl\\Hyphenator\\Filter\\CustomMarkupFilter', $h->getFilters()->getFilterWithKey(1)); }
protected function setOptions() { $this->hyphenator->getOptions()->setHyphen(Fixer::SHY); $this->hyphenator->getOptions()->setLeftMin(4); $this->hyphenator->getOptions()->setRightMin(3); }