|
@@ 89-107 (lines=19) @@
|
| 86 |
|
$this->executor->execute($query, false); |
| 87 |
|
} |
| 88 |
|
|
| 89 |
|
public function testExecuteMigrationQueryDryRun() |
| 90 |
|
{ |
| 91 |
|
$queryDescription = 'test query'; |
| 92 |
|
|
| 93 |
|
$query = $this->getMock('RDV\Bundle\MigrationBundle\Migration\MigrationQuery'); |
| 94 |
|
|
| 95 |
|
$query->expects($this->once()) |
| 96 |
|
->method('getDescription') |
| 97 |
|
->will($this->returnValue($queryDescription)); |
| 98 |
|
|
| 99 |
|
$this->logger->expects($this->once()) |
| 100 |
|
->method('notice') |
| 101 |
|
->with($queryDescription); |
| 102 |
|
|
| 103 |
|
$query->expects($this->never()) |
| 104 |
|
->method('execute'); |
| 105 |
|
|
| 106 |
|
$this->executor->execute($query, true); |
| 107 |
|
} |
| 108 |
|
|
| 109 |
|
public function testExecuteMigrationQueryDryRunArrayDescription() |
| 110 |
|
{ |
|
@@ 132-149 (lines=18) @@
|
| 129 |
|
$this->executor->execute($query, true); |
| 130 |
|
} |
| 131 |
|
|
| 132 |
|
public function testExecuteMigrationQueryDryRunEmptyDescription() |
| 133 |
|
{ |
| 134 |
|
$queryDescription = null; |
| 135 |
|
|
| 136 |
|
$query = $this->getMock('RDV\Bundle\MigrationBundle\Migration\MigrationQuery'); |
| 137 |
|
|
| 138 |
|
$query->expects($this->once()) |
| 139 |
|
->method('getDescription') |
| 140 |
|
->will($this->returnValue($queryDescription)); |
| 141 |
|
|
| 142 |
|
$this->logger->expects($this->never()) |
| 143 |
|
->method('notice'); |
| 144 |
|
|
| 145 |
|
$query->expects($this->never()) |
| 146 |
|
->method('execute'); |
| 147 |
|
|
| 148 |
|
$this->executor->execute($query, true); |
| 149 |
|
} |
| 150 |
|
} |
| 151 |
|
|