/** * Test random command using repository * * @param HgWrapper $wrapper * * @depends testConstructor */ public function testRandomCommand(HgWrapper $wrapper) { $cmd = $this->variables['availCmd']; $wrapper->setCmd($cmd); $command = ['log', '-r', 'tip:0', '--limit' => 10]; $result = $cmd . ' log -r tip:0 --limit=10'; $this->assertEquals($result, $wrapper->buildCommand($command)); $stringResult = $wrapper->execute($command, $this->variables['availRepository'], false); $arrayResult = $wrapper->execute($command, $this->variables['availRepository'], true); $this->assertInternalType('string', $stringResult); $this->assertInternalType('array', $arrayResult); $this->assertNotEmpty($stringResult); $this->assertNotEmpty($arrayResult); }