|
@@ 120-127 (lines=8) @@
|
| 117 |
|
$this->DBDriver->prepared($this->SQL_RAW_ERROR); |
| 118 |
|
} |
| 119 |
|
|
| 120 |
|
public function testPrepared(){ |
| 121 |
|
|
| 122 |
|
foreach(range(0, 9) as $k){ |
| 123 |
|
$this->assertTrue($this->DBDriver->prepared($this->SQL_PREPARED_INSERT, [$k, md5($k)])); |
| 124 |
|
} |
| 125 |
|
|
| 126 |
|
$this->resultTest(); |
| 127 |
|
} |
| 128 |
|
|
| 129 |
|
/** |
| 130 |
|
* @expectedException \chillerlan\Database\DBException |
|
@@ 145-152 (lines=8) @@
|
| 142 |
|
$this->DBDriver->multi($this->SQL_RAW_ERROR, [[0]]); |
| 143 |
|
} |
| 144 |
|
|
| 145 |
|
public function testMulti(){ |
| 146 |
|
|
| 147 |
|
$this->assertTrue($this->DBDriver->multi($this->SQL_PREPARED_INSERT, array_map(function($k){ |
| 148 |
|
return [$k, md5($k)]; |
| 149 |
|
}, range(0, 9)))); |
| 150 |
|
|
| 151 |
|
$this->resultTest(); |
| 152 |
|
} |
| 153 |
|
|
| 154 |
|
/** |
| 155 |
|
* @expectedException \chillerlan\Database\DBException |
|
@@ 178-185 (lines=8) @@
|
| 175 |
|
$this->DBDriver->multi_callback($this->SQL_RAW_ERROR, [[0]], function(){return [];}); |
| 176 |
|
} |
| 177 |
|
|
| 178 |
|
public function testMultiCallback(){ |
| 179 |
|
|
| 180 |
|
$this->assertTrue($this->DBDriver->multi_callback($this->SQL_PREPARED_INSERT, range(0, 9), function($k){ |
| 181 |
|
return [$k, md5($k)]; |
| 182 |
|
})); |
| 183 |
|
|
| 184 |
|
$this->resultTest(); |
| 185 |
|
} |
| 186 |
|
} |
| 187 |
|
|