/**
  * @testdox fromList() tests
  * @dataProvider getFromListTests
  */
 public function testFromList($original, $expected, $delimiter = '/')
 {
     $characterClassBuilder = new CharacterClassBuilder();
     $characterClassBuilder->delimiter = $delimiter;
     $this->assertSame($expected, $characterClassBuilder->fromList($original));
 }
Esempio n. 2
0
 /**
  * Generate a character class from an array of characters
  *
  * @param  array  $chars
  * @return string
  */
 protected static function generateCharacterClass(array $chars)
 {
     return self::$characterClassBuilder->fromList($chars);
 }