/**
  * @test
  */
 public function locateCommand()
 {
     $locateCmd = Factory::createLocate();
     $locateCmd->addPattern('test');
     $locateCmd->setFullpath(true);
     $locateCmd->addInclude('includePattern');
     $locateCmd->addExclude('excludePattern');
     $pattern = '\'test\'';
     $expected = 'hg locate --fullpath --include includePattern --exclude excludePattern ';
     if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
         $pattern = str_replace("'", '"', $pattern);
     }
     $this->assertSame($pattern, implode(' ', $locateCmd->getPattern()));
     $this->assertSame($expected . $pattern, $locateCmd->asString());
 }