Conditions | 1 |
Paths | 1 |
Total Lines | 22 |
Code Lines | 14 |
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::never()) |
||
31 | ->method('setParameter'); |
||
32 | |||
33 | $condition = new IsNull(); |
||
34 | |||
35 | $expr = $condition->getExpr($qb, 0, (new Filter()) |
||
36 | ->setField('t.dummy') |
||
37 | ); |
||
38 | |||
39 | self::assertSame('t.dummy IS NULL', (string)$expr); |
||
40 | } |
||
41 | } |