Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
11 | public function testFetchLikeExpressionResult() : void |
||
12 | { |
||
13 | $string = '_25% off_ your next purchase \o/ [$̲̅(̲̅5̲̅)̲̅$̲̅] (^̮^)'; |
||
14 | $escapeChar = '!'; |
||
15 | $databasePlatform = $this->_conn->getDatabasePlatform(); |
||
16 | $stmt = $this->_conn->prepare(str_replace( |
||
17 | '1', |
||
18 | sprintf( |
||
19 | "(CASE WHEN '%s' LIKE '%s' ESCAPE '%s' THEN 1 ELSE 0 END)", |
||
20 | $string, |
||
21 | $databasePlatform->escapeStringForLike($string, $escapeChar), |
||
22 | $escapeChar |
||
23 | ), |
||
24 | $databasePlatform->getDummySelectSQL() |
||
25 | )); |
||
26 | $stmt->execute(); |
||
27 | $this->assertTrue((bool) $stmt->fetchColumn()); |
||
28 | } |
||
30 |