|
@@ 30-37 (lines=8) @@
|
| 27 |
|
$this->assertEquals('123', $result->getOutput()); |
| 28 |
|
} |
| 29 |
|
|
| 30 |
|
public function testExecuteEscapesDataByDefault() |
| 31 |
|
{ |
| 32 |
|
$this->sut = new ExecutionWrapper(); |
| 33 |
|
$result = $this->sut->exec('echo ? %s', array("'")); |
| 34 |
|
|
| 35 |
|
$this->assertEquals(0, $result->getReturnCode()); |
| 36 |
|
$this->assertEquals("? \'", $result->getOutput()); |
| 37 |
|
} |
| 38 |
|
|
| 39 |
|
public function testExecuteDoesntEscapesCmdWithConfig() |
| 40 |
|
{ |
|
@@ 39-46 (lines=8) @@
|
| 36 |
|
$this->assertEquals("? \'", $result->getOutput()); |
| 37 |
|
} |
| 38 |
|
|
| 39 |
|
public function testExecuteDoesntEscapesCmdWithConfig() |
| 40 |
|
{ |
| 41 |
|
$this->sut = new ExecutionWrapper(['escape_shell_cmd' => false]); |
| 42 |
|
$result = $this->sut->exec('echo ? %s', array("'")); |
| 43 |
|
|
| 44 |
|
$this->assertEquals(0, $result->getReturnCode()); |
| 45 |
|
$this->assertEquals("? '", $result->getOutput()); |
| 46 |
|
} |
| 47 |
|
|
| 48 |
|
public function testExecuteNotifyBeforeAndAfterExecute() |
| 49 |
|
{ |