tests/Filter/EqualsSpec.php 1 location
|
@@ 81-92 (lines=12) @@
|
78 |
|
$this->filterCollection($players)->shouldYield([$players[2]]); |
79 |
|
} |
80 |
|
|
81 |
|
public function it_filter_object_collection(): void |
82 |
|
{ |
83 |
|
$this->beConstructedWith('gender', 'F', null); |
84 |
|
|
85 |
|
$players = [ |
86 |
|
new Player('Joe', 'M', 2500), |
87 |
|
new Player('Moe', 'M', 1230), |
88 |
|
new Player('Alice', 'F', 9001), |
89 |
|
]; |
90 |
|
|
91 |
|
$this->filterCollection($players)->shouldYield([$players[2]]); |
92 |
|
} |
93 |
|
|
94 |
|
public function it_is_satisfied_with_array(): void |
95 |
|
{ |
tests/Filter/GreaterOrEqualThanSpec.php 1 location
|
@@ 81-92 (lines=12) @@
|
78 |
|
$this->filterCollection($players)->shouldYield([$players[2]]); |
79 |
|
} |
80 |
|
|
81 |
|
public function it_filter_object_collection(): void |
82 |
|
{ |
83 |
|
$this->beConstructedWith('points', 9000, null); |
84 |
|
|
85 |
|
$players = [ |
86 |
|
new Player('Joe', 'M', 2500), |
87 |
|
new Player('Moe', 'M', 1230), |
88 |
|
new Player('Alice', 'F', 9000), |
89 |
|
]; |
90 |
|
|
91 |
|
$this->filterCollection($players)->shouldYield([$players[2]]); |
92 |
|
} |
93 |
|
|
94 |
|
public function it_is_satisfied_with_array(): void |
95 |
|
{ |
tests/Filter/GreaterThanSpec.php 1 location
|
@@ 81-92 (lines=12) @@
|
78 |
|
$this->filterCollection($players)->shouldYield([$players[2]]); |
79 |
|
} |
80 |
|
|
81 |
|
public function it_filter_object_collection(): void |
82 |
|
{ |
83 |
|
$this->beConstructedWith('points', 9000, null); |
84 |
|
|
85 |
|
$players = [ |
86 |
|
new Player('Joe', 'M', 2500), |
87 |
|
new Player('Moe', 'M', 1230), |
88 |
|
new Player('Alice', 'F', 9001), |
89 |
|
]; |
90 |
|
|
91 |
|
$this->filterCollection($players)->shouldYield([$players[2]]); |
92 |
|
} |
93 |
|
|
94 |
|
public function it_is_satisfied_with_array(): void |
95 |
|
{ |
tests/Filter/IsEmptySpec.php 1 location
|
@@ 76-87 (lines=12) @@
|
73 |
|
$this->filterCollection($players)->shouldYield([$players[1]]); |
74 |
|
} |
75 |
|
|
76 |
|
public function it_filter_object_collection(): void |
77 |
|
{ |
78 |
|
$this->beConstructedWith('points', null); |
79 |
|
|
80 |
|
$players = [ |
81 |
|
new Player('Joe', 'M', 2500), |
82 |
|
new Player('Moe', 'M', null), |
83 |
|
new Player('Alice', 'F', 9001), |
84 |
|
]; |
85 |
|
|
86 |
|
$this->filterCollection($players)->shouldYield([$players[1]]); |
87 |
|
} |
88 |
|
|
89 |
|
public function it_is_satisfied_with_array(): void |
90 |
|
{ |
tests/Filter/IsNotNullSpec.php 1 location
|
@@ 82-93 (lines=12) @@
|
79 |
|
$this->filterCollection($players)->shouldYield([$players[0], $players[2]]); |
80 |
|
} |
81 |
|
|
82 |
|
public function it_filter_object_collection(): void |
83 |
|
{ |
84 |
|
$this->beConstructedWith('points', null); |
85 |
|
|
86 |
|
$players = [ |
87 |
|
new Player('Joe', 'M', 2500), |
88 |
|
new Player('Moe', 'M', null), |
89 |
|
new Player('Alice', 'F', 9001), |
90 |
|
]; |
91 |
|
|
92 |
|
$this->filterCollection($players)->shouldYield([$players[0], $players[2]]); |
93 |
|
} |
94 |
|
|
95 |
|
public function it_is_satisfied_with_array(): void |
96 |
|
{ |
tests/Filter/IsNullSpec.php 1 location
|
@@ 82-93 (lines=12) @@
|
79 |
|
$this->filterCollection($players)->shouldYield([$players[1]]); |
80 |
|
} |
81 |
|
|
82 |
|
public function it_filter_object_collection(): void |
83 |
|
{ |
84 |
|
$this->beConstructedWith('points', null); |
85 |
|
|
86 |
|
$players = [ |
87 |
|
new Player('Joe', 'M', 2500), |
88 |
|
new Player('Moe', 'M', null), |
89 |
|
new Player('Alice', 'F', 9001), |
90 |
|
]; |
91 |
|
|
92 |
|
$this->filterCollection($players)->shouldYield([$players[1]]); |
93 |
|
} |
94 |
|
|
95 |
|
public function it_is_satisfied_with_array(): void |
96 |
|
{ |
tests/Filter/LessThanSpec.php 1 location
|
@@ 81-92 (lines=12) @@
|
78 |
|
$this->filterCollection($players)->shouldYield([$players[1]]); |
79 |
|
} |
80 |
|
|
81 |
|
public function it_filter_object_collection(): void |
82 |
|
{ |
83 |
|
$this->beConstructedWith('points', 2500, null); |
84 |
|
|
85 |
|
$players = [ |
86 |
|
new Player('Joe', 'M', 2500), |
87 |
|
new Player('Moe', 'M', 1230), |
88 |
|
new Player('Alice', 'F', 9001), |
89 |
|
]; |
90 |
|
|
91 |
|
$this->filterCollection($players)->shouldYield([$players[1]]); |
92 |
|
} |
93 |
|
|
94 |
|
public function it_is_satisfied_with_array(): void |
95 |
|
{ |
tests/Filter/LikeSpec.php 1 location
|
@@ 171-182 (lines=12) @@
|
168 |
|
$this->filterCollection($players)->shouldYield([$players[0], $players[1]]); |
169 |
|
} |
170 |
|
|
171 |
|
public function it_filter_object_collection_starts_with(): void |
172 |
|
{ |
173 |
|
$this->beConstructedWith('pseudo', 'M', Like::STARTS_WITH, null); |
174 |
|
|
175 |
|
$players = [ |
176 |
|
new Player('Joe', 'M', 2500), |
177 |
|
new Player('Moe', 'M', 1230), |
178 |
|
new Player('Alice', 'F', 9001), |
179 |
|
]; |
180 |
|
|
181 |
|
$this->filterCollection($players)->shouldYield([$players[1]]); |
182 |
|
} |
183 |
|
|
184 |
|
public function it_filter_object_collection_ends_with(): void |
185 |
|
{ |
tests/Filter/NotEqualsSpec.php 1 location
|
@@ 81-92 (lines=12) @@
|
78 |
|
$this->filterCollection($players)->shouldYield([$players[2]]); |
79 |
|
} |
80 |
|
|
81 |
|
public function it_filter_object_collection(): void |
82 |
|
{ |
83 |
|
$this->beConstructedWith('gender', 'M', null); |
84 |
|
|
85 |
|
$players = [ |
86 |
|
new Player('Joe', 'M', 2500), |
87 |
|
new Player('Moe', 'M', 1230), |
88 |
|
new Player('Alice', 'F', 9001), |
89 |
|
]; |
90 |
|
|
91 |
|
$this->filterCollection($players)->shouldYield([$players[2]]); |
92 |
|
} |
93 |
|
|
94 |
|
public function it_is_satisfied_with_array(): void |
95 |
|
{ |
tests/Logic/AndXSpec.php 1 location
|
@@ 138-149 (lines=12) @@
|
135 |
|
$this->filterCollection($players)->shouldNotYield([]); |
136 |
|
} |
137 |
|
|
138 |
|
public function it_filter_object_collection_not_satisfiable(Filter $exprA, Filter $exprB): void |
139 |
|
{ |
140 |
|
$this->beConstructedWith($exprA, $exprB); |
141 |
|
|
142 |
|
$players = [ |
143 |
|
new Player('Joe', 'M', 2500), |
144 |
|
new Player('Moe', 'M', 1230), |
145 |
|
new Player('Alice', 'F', 9001), |
146 |
|
]; |
147 |
|
|
148 |
|
$this->filterCollection($players)->shouldNotYield([]); |
149 |
|
} |
150 |
|
|
151 |
|
public function it_is_satisfied_with_array(): void |
152 |
|
{ |
tests/Logic/NotSpec.php 1 location
|
@@ 109-120 (lines=12) @@
|
106 |
|
$this->filterCollection($players)->shouldNotYield([]); |
107 |
|
} |
108 |
|
|
109 |
|
public function it_filter_object_collection_not_satisfiable(Filter $expr): void |
110 |
|
{ |
111 |
|
$this->beConstructedWith($expr); |
112 |
|
|
113 |
|
$players = [ |
114 |
|
new Player('Joe', 'M', 2500), |
115 |
|
new Player('Moe', 'M', 1230), |
116 |
|
new Player('Alice', 'F', 9001), |
117 |
|
]; |
118 |
|
|
119 |
|
$this->filterCollection($players)->shouldNotYield([]); |
120 |
|
} |
121 |
|
|
122 |
|
public function it_is_satisfied_with_array(): void |
123 |
|
{ |
tests/Logic/OrXSpec.php 1 location
|
@@ 141-152 (lines=12) @@
|
138 |
|
$this->filterCollection($players)->shouldNotYield([]); |
139 |
|
} |
140 |
|
|
141 |
|
public function it_filter_object_collection_not_satisfiable(Filter $exprA, Filter $exprB): void |
142 |
|
{ |
143 |
|
$this->beConstructedWith($exprA, $exprB); |
144 |
|
|
145 |
|
$players = [ |
146 |
|
new Player('Joe', 'M', 2500), |
147 |
|
new Player('Moe', 'M', 1230), |
148 |
|
new Player('Alice', 'F', 9001), |
149 |
|
]; |
150 |
|
|
151 |
|
$this->filterCollection($players)->shouldNotYield([]); |
152 |
|
} |
153 |
|
|
154 |
|
public function it_is_satisfied_with_array(): void |
155 |
|
{ |