public function only($only = null) { $only = is_array($only) ? $only : func_get_args(); $this->enabledParsers = $this->arrayOnly($this->parsers, $only); return $this; }
public function testOnlyFunctionality() { $b = new BBCodeParser(); $onlyParsers = array_values($b->only('image', 'link')->getParsers()); $this->assertEquals($onlyParsers, array('image', 'link')); }