@@ 189-201 (lines=13) @@ | ||
186 | * |
|
187 | * @return $this |
|
188 | */ |
|
189 | public function isSortedUsing(ComparatorInterface $comparator) |
|
190 | { |
|
191 | list($item1, $item2) = $this->checkIsSorted($comparator); |
|
192 | if($item1 !== null && $item2 !== null) { |
|
193 | $this->fail( |
|
194 | $this->_("There are items [%s, %s] that aren't ordered in the given collection", $item1, $item2) |
|
195 | ); |
|
196 | } else { |
|
197 | $this->pass(); |
|
198 | } |
|
199 | ||
200 | return $this; |
|
201 | } |
|
202 | ||
203 | /** |
|
204 | * @return $this |
|
@@ 216-226 (lines=11) @@ | ||
213 | * |
|
214 | * @return $this |
|
215 | */ |
|
216 | public function isNotSortedUsing(ComparatorInterface $comparator) |
|
217 | { |
|
218 | list($item1, $item2) = $this->checkIsSorted($comparator); |
|
219 | if($item1 !== null && $item2 !== null) { |
|
220 | $this->fail($this->_('The given collection is sorted')); |
|
221 | } else { |
|
222 | $this->pass(); |
|
223 | } |
|
224 | ||
225 | return $this; |
|
226 | } |
|
227 | ||
228 | /** |
|
229 | * @param ComparatorInterface $comparator |