| @@ 134-141 (lines=8) @@ | ||
| 131 | $this->DBDriver->prepared($this->SQL_RAW_ERROR); |
|
| 132 | } |
|
| 133 | ||
| 134 | public function testPrepared(){ |
|
| 135 | ||
| 136 | foreach(range(0, 9) as $k){ |
|
| 137 | $this->assertTrue($this->DBDriver->prepared($this->SQL_PREPARED_INSERT, [$k, md5($k)])); |
|
| 138 | } |
|
| 139 | ||
| 140 | $this->resultTest(); |
|
| 141 | } |
|
| 142 | ||
| 143 | /** |
|
| 144 | * @expectedException \chillerlan\Database\DBException |
|
| @@ 159-166 (lines=8) @@ | ||
| 156 | $this->DBDriver->multi($this->SQL_RAW_ERROR, [[0]]); |
|
| 157 | } |
|
| 158 | ||
| 159 | public function testMulti(){ |
|
| 160 | ||
| 161 | $this->assertTrue( |
|
| 162 | $this->DBDriver->multi( |
|
| 163 | $this->SQL_PREPARED_INSERT, array_map( |
|
| 164 | function($k){ |
|
| 165 | return [$k, md5($k)]; |
|
| 166 | }, range(0, 9) |
|
| 167 | ) |
|
| 168 | ) |
|
| 169 | ); |
|
| @@ 203-210 (lines=8) @@ | ||
| 200 | }); |
|
| 201 | } |
|
| 202 | ||
| 203 | public function testMultiCallback(){ |
|
| 204 | ||
| 205 | $this->assertTrue($this->DBDriver->multi_callback( |
|
| 206 | $this->SQL_PREPARED_INSERT, range(0, 9), function($k){ |
|
| 207 | return [$k, md5($k)]; |
|
| 208 | })); |
|
| 209 | ||
| 210 | $this->resultTest(); |
|
| 211 | } |
|
| 212 | ||
| 213 | public function testCached(){ |
|