33
44use ArrayAccess ;
55
6- class DequeTest extends CollectionTest
6+ class DequeTest extends CollectionTestCase
77{
88 use Sequence \_clone;
99 use Sequence \_echo;
@@ -54,14 +54,14 @@ class DequeTest extends CollectionTest
5454 use Sequence \toArray;
5555 use Sequence \unshift;
5656
57- public function getInstance (array $ values = [])
57+ public static function getInstance (array $ values = [])
5858 {
5959 return new \Ds \Deque ($ values );
6060 }
6161
6262 public function testReallocatingWhenHeadNotAtZero ()
6363 {
64- $ instance = $ this -> getInstance ();
64+ $ instance = static :: getInstance ();
6565
6666 $ instance ->push ('a ' , 'b ' , 'c ' , 'd ' );
6767 $ instance ->shift ();
@@ -81,7 +81,7 @@ public function testReallocatingWhenHeadNotAtZero()
8181
8282 public function testReallocatingWhenHeadHasWrapped ()
8383 {
84- $ instance = $ this -> getInstance ();
84+ $ instance = static :: getInstance ();
8585
8686 $ instance ->push ('a ' );
8787 $ instance ->push ('b ' );
@@ -106,7 +106,7 @@ public function testReallocatingWhenHeadHasWrapped()
106106
107107 public function testRealignmentOfWrappedBufferWithLargeTempSpace ()
108108 {
109- $ instance = $ this -> getInstance (); // [_, _, _, _, _, _, _, _]
109+ $ instance = static :: getInstance (); // [_, _, _, _, _, _, _, _]
110110
111111 $ instance ->push ('c ' , 'd ' );
112112 $ instance ->unshift ('a ' , 'b ' ); // [c, d, _, _, _, _, a, b]
@@ -132,7 +132,7 @@ public function testRealignmentOfWrappedBufferWithLargeTempSpace()
132132 // Also test the boundary case, where the number of wrapped values
133133 // equals the amount of free space in the buffer.
134134
135- $ instance = $ this -> getInstance (); // [_, _, _, _, _, _, _, _]
135+ $ instance = static :: getInstance (); // [_, _, _, _, _, _, _, _]
136136
137137 $ instance ->push ('c ' , 'd ' , 'e ' , 'f ' );
138138 $ instance ->unshift ('a ' , 'b ' ); // [c, d, e, f, _, _, a, b]
@@ -149,7 +149,7 @@ public function testRealignmentOfWrappedBufferWithLargeTempSpace()
149149 ////////////////////////////////////////////////////////////////
150150 // Also test for assurance when there isn't enough space.
151151
152- $ instance = $ this -> getInstance (); // [_, _, _, _, _, _, _, _]
152+ $ instance = static :: getInstance (); // [_, _, _, _, _, _, _, _]
153153
154154 $ instance ->push ('c ' , 'd ' , 'e ' , 'f ' , 'g ' );
155155 $ instance ->unshift ('a ' , 'b ' ); // [c, d, e, f, g, _, a, b]
@@ -166,6 +166,6 @@ public function testRealignmentOfWrappedBufferWithLargeTempSpace()
166166
167167 public function testImplementsArrayAccess ()
168168 {
169- $ this ->assertInstanceOf (ArrayAccess::class, $ this -> getInstance ());
169+ $ this ->assertInstanceOf (ArrayAccess::class, static :: getInstance ());
170170 }
171171}
0 commit comments