@@ 151-158 (lines=8) @@ | ||
148 | $this->DBDriver->prepared($this->SQL_RAW_ERROR); |
|
149 | } |
|
150 | ||
151 | public function testPrepared(){ |
|
152 | ||
153 | foreach(range(0, 9) as $k){ |
|
154 | $this->assertTrue($this->DBDriver->prepared($this->SQL_PREPARED_INSERT, [$k, md5($k)])); |
|
155 | } |
|
156 | ||
157 | $this->resultTest(); |
|
158 | } |
|
159 | ||
160 | /** |
|
161 | * @expectedException \chillerlan\Database\DBException |
|
@@ 176-183 (lines=8) @@ | ||
173 | $this->DBDriver->multi($this->SQL_RAW_ERROR, [[0]]); |
|
174 | } |
|
175 | ||
176 | public function testMulti(){ |
|
177 | ||
178 | $this->assertTrue( |
|
179 | $this->DBDriver->multi( |
|
180 | $this->SQL_PREPARED_INSERT, array_map( |
|
181 | function($k){ |
|
182 | return [$k, md5($k)]; |
|
183 | }, range(0, 9) |
|
184 | ) |
|
185 | ) |
|
186 | ); |
|
@@ 220-227 (lines=8) @@ | ||
217 | }); |
|
218 | } |
|
219 | ||
220 | public function testMultiCallback(){ |
|
221 | ||
222 | $this->assertTrue($this->DBDriver->multi_callback( |
|
223 | $this->SQL_PREPARED_INSERT, range(0, 9), function($k){ |
|
224 | return [$k, md5($k)]; |
|
225 | })); |
|
226 | ||
227 | $this->resultTest(); |
|
228 | } |
|
229 | ||
230 | public function testCached(){ |