@@ 57-63 (lines=7) @@ | ||
54 | /** |
|
55 | * @group 6740 |
|
56 | */ |
|
57 | public function testCollectionFilteringLteOperator() : void |
|
58 | { |
|
59 | $product = $this->_em->find(ECommerceProduct::class, $this->productId); |
|
60 | $criteria = Criteria::create()->where(Criteria::expr()->lte('id', $this->secondCategoryId)); |
|
61 | ||
62 | self::assertCount(2, $product->getCategories()->matching($criteria)); |
|
63 | } |
|
64 | ||
65 | /** |
|
66 | * @group 6740 |
|
@@ 68-74 (lines=7) @@ | ||
65 | /** |
|
66 | * @group 6740 |
|
67 | */ |
|
68 | public function testCollectionFilteringLtOperator() : void |
|
69 | { |
|
70 | $product = $this->_em->find(ECommerceProduct::class, $this->productId); |
|
71 | $criteria = Criteria::create()->where(Criteria::expr()->lt('id', $this->secondCategoryId)); |
|
72 | ||
73 | self::assertCount(1, $product->getCategories()->matching($criteria)); |
|
74 | } |
|
75 | ||
76 | /** |
|
77 | * @group 6740 |
|
@@ 79-85 (lines=7) @@ | ||
76 | /** |
|
77 | * @group 6740 |
|
78 | */ |
|
79 | public function testCollectionFilteringGteOperator() : void |
|
80 | { |
|
81 | $product = $this->_em->find(ECommerceProduct::class, $this->productId); |
|
82 | $criteria = Criteria::create()->where(Criteria::expr()->gte('id', $this->firstCategoryId)); |
|
83 | ||
84 | self::assertCount(2, $product->getCategories()->matching($criteria)); |
|
85 | } |
|
86 | ||
87 | /** |
|
88 | * @group 6740 |
|
@@ 90-96 (lines=7) @@ | ||
87 | /** |
|
88 | * @group 6740 |
|
89 | */ |
|
90 | public function testCollectionFilteringGtOperator() : void |
|
91 | { |
|
92 | $product = $this->_em->find(ECommerceProduct::class, $this->productId); |
|
93 | $criteria = Criteria::create()->where(Criteria::expr()->gt('id', $this->firstCategoryId)); |
|
94 | ||
95 | self::assertCount(1, $product->getCategories()->matching($criteria)); |
|
96 | } |
|
97 | ||
98 | /** |
|
99 | * @group 6740 |
|
@@ 101-107 (lines=7) @@ | ||
98 | /** |
|
99 | * @group 6740 |
|
100 | */ |
|
101 | public function testCollectionFilteringEqualsOperator() : void |
|
102 | { |
|
103 | $product = $this->_em->find(ECommerceProduct::class, $this->productId); |
|
104 | $criteria = Criteria::create()->where(Criteria::expr()->eq('id', $this->firstCategoryId)); |
|
105 | ||
106 | self::assertCount(1, $product->getCategories()->matching($criteria)); |
|
107 | } |
|
108 | } |
|
109 |