@@ 52-68 (lines=17) @@ | ||
49 | $this->assertInstanceOf(ExpressionBuilderInterface::class, $this->expressionBuilder); |
|
50 | } |
|
51 | ||
52 | public function testAndX() |
|
53 | { |
|
54 | $this->queryBuilder |
|
55 | ->expects($this->once()) |
|
56 | ->method('expr') |
|
57 | ->will($this->returnValue($expr = $this->createExprMock())); |
|
58 | ||
59 | $expr |
|
60 | ->expects($this->exactly(2)) |
|
61 | ->method('addAnd') |
|
62 | ->withConsecutive( |
|
63 | [$expression1 = 'expression1'], |
|
64 | [$expression2 = 'expression2'] |
|
65 | ); |
|
66 | ||
67 | $this->assertSame($expr, $this->expressionBuilder->andX([$expression1, $expression2])); |
|
68 | } |
|
69 | ||
70 | public function testOrX() |
|
71 | { |
|
@@ 70-86 (lines=17) @@ | ||
67 | $this->assertSame($expr, $this->expressionBuilder->andX([$expression1, $expression2])); |
|
68 | } |
|
69 | ||
70 | public function testOrX() |
|
71 | { |
|
72 | $this->queryBuilder |
|
73 | ->expects($this->once()) |
|
74 | ->method('expr') |
|
75 | ->will($this->returnValue($expr = $this->createExprMock())); |
|
76 | ||
77 | $expr |
|
78 | ->expects($this->exactly(2)) |
|
79 | ->method('addOr') |
|
80 | ->withConsecutive( |
|
81 | [$expression1 = 'expression1'], |
|
82 | [$expression2 = 'expression2'] |
|
83 | ); |
|
84 | ||
85 | $this->assertSame($expr, $this->expressionBuilder->orX([$expression1, $expression2])); |
|
86 | } |
|
87 | ||
88 | public function testAsc() |
|
89 | { |