public function testExplodePipeDelimiter() { $string = "foo|bar|baz"; $expected = array('foo', 'bar', 'baz'); $filter = new Filter\Explode('|'); $this->assertEquals($expected, $filter->filter($string)); }
/** * @param mixed $value * * @return array|mixed */ public function filter($value) { $list = parent::filter($value); $dashToCamelCaseFilter = new DashToCamelCase(); $underscoreToCamelCaseFilter = new UnderscoreToCamelCase(); foreach ($list as $listKey => $listOption) { $listOption = $dashToCamelCaseFilter->filter($listOption); $listOption = $underscoreToCamelCaseFilter->filter($listOption); $list[$listKey] = $listOption; } return $list; }