@@ -14,7 +14,6 @@ function expect_throws(Closure $cb): void {
1414expect_throws (fn () => (new ReflectionClass (Collections \Deque::class))->newInstanceWithoutConstructor ());
1515$ it = new Collections \Deque (['first ' => new stdClass ()]);
1616var_dump ($ it ->offsetGet (0 ));
17- var_dump ($ it ->get (0 ));
1817expect_throws (fn () => $ it ->offsetSet (1 ,'x ' ));
1918expect_throws (fn () => $ it ->offsetUnset (0 ));
2019var_dump ($ it ->offsetGet ('0 ' ));
@@ -23,20 +22,15 @@ var_dump($it->offsetExists(1));
2322var_dump ($ it ->offsetExists ('1 ' ));
2423var_dump ($ it ->offsetExists (PHP_INT_MAX ));
2524var_dump ($ it ->offsetExists (PHP_INT_MIN ));
26- expect_throws (fn () => $ it ->get (1 ));
27- expect_throws (fn () => $ it ->get (-1 ));
25+ expect_throws (fn () => $ it ->offsetGet (1 ));
26+ expect_throws (fn () => $ it ->offsetGet (-1 ));
2827echo "Invalid offsetGet calls \n" ;
2928expect_throws (fn () => $ it ->offsetGet (PHP_INT_MAX ));
3029expect_throws (fn () => $ it ->offsetGet (PHP_INT_MIN ));
3130expect_throws (fn () => $ it ->offsetGet (1 ));
32- expect_throws (fn () => $ it ->get (PHP_INT_MAX ));
33- expect_throws (fn () => $ it ->get (PHP_INT_MIN ));
34- expect_throws (fn () => $ it ->get (1 ));
35- expect_throws (fn () => $ it ->get (-1 ));
36- expect_throws (fn () => $ it ->offsetGet (1 ));
31+ expect_throws (fn () => $ it ->offsetGet (-1 ));
3732expect_throws (fn () => $ it ->offsetGet ('1 ' ));
3833expect_throws (fn () => $ it ->offsetGet ('invalid ' ));
39- expect_throws (fn () => $ it ->get ('invalid ' ));
4034expect_throws (fn () => $ it [['invalid ' ]]);
4135expect_throws (fn () => $ it ->offsetUnset (PHP_INT_MAX ));
4236expect_throws (fn () => $ it ->offsetSet (PHP_INT_MAX ,'x ' ));
@@ -47,8 +41,6 @@ var_dump($it->getIterator());
4741Caught ReflectionException: Class Collections\Deque is an internal class marked as final that cannot be instantiated without invoking its constructor
4842object(stdClass)#1 (0) {
4943}
50- object(stdClass)#1 (0) {
51- }
5244Caught OutOfBoundsException: Index out of range
5345Caught RuntimeException: Collections\Deque does not support offsetUnset - elements must be set to null or removed by resizing
5446object(stdClass)#1 (0) {
@@ -66,15 +58,10 @@ Caught OutOfBoundsException: Index out of range
6658Caught OutOfBoundsException: Index out of range
6759Caught OutOfBoundsException: Index out of range
6860Caught OutOfBoundsException: Index out of range
69- Caught OutOfBoundsException: Index out of range
70- Caught OutOfBoundsException: Index out of range
71- Caught OutOfBoundsException: Index out of range
72- Caught OutOfBoundsException: Index out of range
7361Caught TypeError: Illegal offset type
74- Caught TypeError: Collections\Deque::get(): Argument #1 ($offset) must be of type int, string given
7562Caught TypeError: Illegal offset type
7663Caught RuntimeException: Collections\Deque does not support offsetUnset - elements must be set to null or removed by resizing
7764Caught OutOfBoundsException: Index out of range
7865Caught RuntimeException: Collections\Deque does not support offsetUnset - elements must be set to null or removed by resizing
79- object(InternalIterator)#2 (0) {
66+ object(InternalIterator)#4 (0) {
8067}
0 commit comments