| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | public function testFetchLikeExpressionResult() : void |
||
| 10 | { |
||
| 11 | $string = '_25% off_ your next purchase \o/'; |
||
| 12 | $escapeChar = '!'; |
||
| 13 | $stmt = $this->_conn->prepare(sprintf( |
||
| 14 | "SELECT '%s' LIKE '%s' ESCAPE '%s' as it_matches", |
||
| 15 | $string, |
||
| 16 | $this->_conn->getDatabasePlatform()->escapeStringForLike($string, $escapeChar), |
||
| 17 | $escapeChar |
||
| 18 | )); |
||
| 19 | $stmt->execute(); |
||
| 20 | $this->assertTrue((bool) $stmt->fetch()['it_matches']); |
||
| 21 | } |
||
| 23 |