| 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::never()) |
||
| 26 | ->method('expr'); |
||
| 27 | |||
| 28 | $qb |
||
| 29 | ->expects($this->exactly(2)) |
||
| 30 | ->method('setParameter') |
||
| 31 | ->withConsecutive(['x0', 1], ['y0', 10]) |
||
| 32 | ->willReturn($qb); |
||
| 33 | |||
| 34 | $condition = new NotBetween(); |
||
| 35 | |||
| 36 | $expr = $condition->getExpr($qb, 0, (new Filter()) |
||
| 37 | ->setField('t.dummy') |
||
| 38 | ->setX('1') |
||
| 39 | ->setY('10') |
||
| 40 | ); |
||
| 41 | |||
| 42 | self::assertSame('t.dummy NOT BETWEEN :x0 AND :y0', (string)$expr); |
||
| 43 | } |
||
| 44 | } |