/** * @test */ public function identifyCommand() { $identifyCmd = Factory::createIdentify(); $identifyCmd->setSource('C:\\xampp\\source\\'); $identifyCmd->setNum(true); $identifyCmd->setInsecure(true); $source = '\'C:\\xampp\\source\\\''; $expected = "hg identify --num --insecure "; if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $source = str_replace("'", '"', $source); } $this->assertSame($source, $identifyCmd->getSource()); $this->assertSame($expected . $source, $identifyCmd->asString()); }