| Conditions | 1 |
| Paths | 1 |
| Total Lines | 25 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 18 | public function testGetExpr() |
||
| 19 | { |
||
| 20 | $qb = $this->getMockBuilder(QueryBuilder::class) |
||
| 21 | ->disableOriginalConstructor() |
||
| 22 | ->getMock(); |
||
| 23 | |||
| 24 | $qb |
||
| 25 | ->expects(self::once()) |
||
| 26 | ->method('expr') |
||
| 27 | ->willReturn(new Expr()); |
||
| 28 | |||
| 29 | $qb |
||
| 30 | ->expects(self::once()) |
||
| 31 | ->method('setParameter') |
||
| 32 | ->with(0, 10) |
||
| 33 | ->willReturn($qb); |
||
| 34 | |||
| 35 | $condition = new Lte(); |
||
| 36 | |||
| 37 | $expr = $condition->getExpr($qb, 0, (new Filter()) |
||
| 38 | ->setField('t.dummy') |
||
| 39 | ->setX('10') |
||
| 40 | ); |
||
| 41 | |||
| 42 | self::assertSame('t.dummy <= ?0', (string)$expr); |
||
| 43 | } |
||
| 44 | } |