@@ -14,7 +14,6 @@ function expect_throws(Closure $cb): void {
14
14
expect_throws (fn () => (new ReflectionClass (Collections \Deque::class))->newInstanceWithoutConstructor ());
15
15
$ it = new Collections \Deque (['first ' => new stdClass ()]);
16
16
var_dump ($ it ->offsetGet (0 ));
17
- var_dump ($ it ->get (0 ));
18
17
expect_throws (fn () => $ it ->offsetSet (1 ,'x ' ));
19
18
expect_throws (fn () => $ it ->offsetUnset (0 ));
20
19
var_dump ($ it ->offsetGet ('0 ' ));
@@ -23,20 +22,15 @@ var_dump($it->offsetExists(1));
23
22
var_dump ($ it ->offsetExists ('1 ' ));
24
23
var_dump ($ it ->offsetExists (PHP_INT_MAX ));
25
24
var_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 ));
28
27
echo "Invalid offsetGet calls \n" ;
29
28
expect_throws (fn () => $ it ->offsetGet (PHP_INT_MAX ));
30
29
expect_throws (fn () => $ it ->offsetGet (PHP_INT_MIN ));
31
30
expect_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 ));
37
32
expect_throws (fn () => $ it ->offsetGet ('1 ' ));
38
33
expect_throws (fn () => $ it ->offsetGet ('invalid ' ));
39
- expect_throws (fn () => $ it ->get ('invalid ' ));
40
34
expect_throws (fn () => $ it [['invalid ' ]]);
41
35
expect_throws (fn () => $ it ->offsetUnset (PHP_INT_MAX ));
42
36
expect_throws (fn () => $ it ->offsetSet (PHP_INT_MAX ,'x ' ));
@@ -47,8 +41,6 @@ var_dump($it->getIterator());
47
41
Caught ReflectionException: Class Collections\Deque is an internal class marked as final that cannot be instantiated without invoking its constructor
48
42
object(stdClass)#1 (0) {
49
43
}
50
- object(stdClass)#1 (0) {
51
- }
52
44
Caught OutOfBoundsException: Index out of range
53
45
Caught RuntimeException: Collections\Deque does not support offsetUnset - elements must be set to null or removed by resizing
54
46
object(stdClass)#1 (0) {
@@ -66,15 +58,10 @@ Caught OutOfBoundsException: Index out of range
66
58
Caught OutOfBoundsException: Index out of range
67
59
Caught OutOfBoundsException: Index out of range
68
60
Caught 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
73
61
Caught TypeError: Illegal offset type
74
- Caught TypeError: Collections\Deque::get(): Argument #1 ($offset) must be of type int, string given
75
62
Caught TypeError: Illegal offset type
76
63
Caught RuntimeException: Collections\Deque does not support offsetUnset - elements must be set to null or removed by resizing
77
64
Caught OutOfBoundsException: Index out of range
78
65
Caught 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) {
80
67
}
0 commit comments