| Conditions | 1 |
| Paths | 1 |
| Total Lines | 26 |
| Code Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 45 | public function testGetExprExact() |
||
| 46 | { |
||
| 47 | $qb = $this->getMockBuilder(QueryBuilder::class) |
||
| 48 | ->disableOriginalConstructor() |
||
| 49 | ->getMock(); |
||
| 50 | |||
| 51 | $qb |
||
| 52 | ->expects(self::once()) |
||
| 53 | ->method('expr') |
||
| 54 | ->willReturn(new Expr()); |
||
| 55 | |||
| 56 | $qb |
||
| 57 | ->expects(self::once()) |
||
| 58 | ->method('setParameter') |
||
| 59 | ->with(0, '%road to hell%') |
||
| 60 | ->willReturn($qb); |
||
| 61 | |||
| 62 | $condition = new Like(); |
||
| 63 | |||
| 64 | $expr = $condition->getExpr($qb, 0, (new Filter()) |
||
| 65 | ->setField('t.dummy') |
||
| 66 | ->setX('road to hell') |
||
| 67 | ->setExtra('exact') |
||
| 68 | ); |
||
| 69 | |||
| 70 | self::assertSame('t.dummy LIKE ?0', (string)$expr); |
||
| 71 | } |
||
| 72 | } |