@@ -210,6 +210,14 @@ public function processOperation($operation, $lastOperationResult, &$context, $t
210
210
return $ this ->operationGreaterThan ($ operation ->{$ operationName }, $ lastOperationResult , $ context , $ testName );
211
211
}
212
212
213
+ if ('lte ' === $ operationName ) {
214
+ return $ this ->operationLessThanOrEqual ($ operation ->{$ operationName }, $ lastOperationResult , $ context , $ testName );
215
+ }
216
+
217
+ if ('t ' === $ operationName ) {
218
+ return $ this ->operationLessThan ($ operation ->{$ operationName }, $ lastOperationResult , $ context , $ testName );
219
+ }
220
+
213
221
if ('length ' === $ operationName ) {
214
222
return $ this ->operationLength ($ operation ->{$ operationName }, $ lastOperationResult , $ context , $ testName );
215
223
}
@@ -538,6 +546,40 @@ public function operationGreaterThan($operation, $lastOperationResult, &$context
538
546
return $ lastOperationResult ;
539
547
}
540
548
549
+ /**
550
+ * Check if a field in the last operation is less than or equal a value
551
+ *
552
+ * @param $operation
553
+ * @param $lastOperationResult
554
+ * @param $testName
555
+ */
556
+ public function operationLessThanOrEqual ($ operation , $ lastOperationResult , &$ context , $ testName )
557
+ {
558
+ $ value = $ this ->resolveValue ($ lastOperationResult , key ($ operation ), $ context );
559
+ $ expected = current ($ operation );
560
+
561
+ static ::assertLessThanOrEqual ($ expected , $ value , 'Failed to lte in test ' . $ testName );
562
+
563
+ return $ lastOperationResult ;
564
+ }
565
+
566
+ /**
567
+ * Check if a field in the last operation is less than a value
568
+ *
569
+ * @param $operation
570
+ * @param $lastOperationResult
571
+ * @param $testName
572
+ */
573
+ public function operationLessThan ($ operation , $ lastOperationResult , &$ context , $ testName )
574
+ {
575
+ $ value = $ this ->resolveValue ($ lastOperationResult , key ($ operation ), $ context );
576
+ $ expected = current ($ operation );
577
+
578
+ static ::assertLessThan ($ expected , $ value , 'Failed to lt in test ' . $ testName );
579
+
580
+ return $ lastOperationResult ;
581
+ }
582
+
541
583
/**
542
584
* Check if a field in the last operation has length of a value
543
585
*
0 commit comments