Пример #1
0
 /**
  * @dataProvider joinDataProvider
  */
 function testJoin($input, $expected)
 {
     $actual = Shellwords::join($input);
     $this->assertEquals($expected, $actual);
 }
Пример #2
0
 protected function getDirectives()
 {
     if (null === $this->parsedDirectives) {
         $this->parsedDirectives = array();
         foreach (explode("\n", $this->header) as $i => $line) {
             if (preg_match(static::DIRECTIVE_PATTERN, $line, $matches)) {
                 $argv = Shellwords::split($matches[1]);
                 $name = array_shift($argv);
                 $this->parsedDirectives[$i] = array($i, $name, $argv);
             }
         }
     }
     return $this->parsedDirectives;
 }