| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function locateCommand() |
||
| 23 | { |
||
| 24 | $locateCmd = Factory::createLocate(); |
||
| 25 | $locateCmd->addPattern('test'); |
||
| 26 | $locateCmd->setFullpath(true); |
||
| 27 | $locateCmd->addInclude('includePattern'); |
||
| 28 | $locateCmd->addExclude('excludePattern'); |
||
| 29 | |||
| 30 | $pattern = '\'test\''; |
||
| 31 | $expected = 'hg locate --fullpath --include includePattern --exclude excludePattern '; |
||
| 32 | |||
| 33 | if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { |
||
| 34 | $pattern = str_replace("'", '"', $pattern); |
||
| 35 | } |
||
| 36 | |||
| 37 | $this->assertSame($pattern, implode(' ', $locateCmd->getPattern())); |
||
| 38 | $this->assertSame($expected . $pattern, $locateCmd->asString()); |
||
| 39 | } |
||
| 40 | } |
||
| 41 |