@@ -69,8 +69,8 @@ protected function setUp(): void
6969 */
7070 public function testCacheEnabled (): void
7171 {
72- self ::assertSame ('foo ' , $ this ->connector ->fetch ($ this ->context , ' baz ' ));
73- self ::assertSame ('foo ' , $ this ->connector ->fetch ($ this ->context , ' baz ' ));
72+ self ::assertSame ('foo ' , $ this ->connector ->fetch (' baz ' , $ this ->context ));
73+ self ::assertSame ('foo ' , $ this ->connector ->fetch (' baz ' , $ this ->context ));
7474 }
7575
7676 /**
@@ -81,35 +81,35 @@ public function testCacheDisabled(): void
8181 // The default connection context has caching disabled.
8282 $ context = FixtureFactory::buildConnectionContext ();
8383
84- self ::assertSame ('foo ' , $ this ->connector ->fetch ($ context , 'baz ' ));
85- self ::assertSame ('bar ' , $ this ->connector ->fetch ($ context , 'baz ' ));
84+ self ::assertSame ('foo ' , $ this ->connector ->fetch ('baz ' , $ context ));
85+ self ::assertSame ('bar ' , $ this ->connector ->fetch ('baz ' , $ context ));
8686 }
8787
8888 /**
8989 * Tests that when sources are the same but options are different, the cache is not reused.
9090 */
9191 public function testCacheBypassedForDifferentOptions (): void
9292 {
93- self ::assertSame ('foo ' , $ this ->connector ->fetch ($ this ->context , ' baz ' ));
93+ self ::assertSame ('foo ' , $ this ->connector ->fetch (' baz ' , $ this ->context ));
9494
9595 $ this ->options ->setFoo ('bar ' );
96- self ::assertSame ('bar ' , $ this ->connector ->fetch ($ this ->context , ' baz ' ));
96+ self ::assertSame ('bar ' , $ this ->connector ->fetch (' baz ' , $ this ->context ));
9797 }
9898
9999 /**
100100 * Tests that when the same options are specified by two different object instances, the cache is reused.
101101 */
102102 public function testCacheUsedForDifferentOptionsInstance (): void
103103 {
104- self ::assertSame ('foo ' , $ this ->connector ->fetch ($ this ->context , ' baz ' ));
104+ self ::assertSame ('foo ' , $ this ->connector ->fetch (' baz ' , $ this ->context ));
105105
106106 $ this ->wrappedConnector ->shouldReceive ('getOptions ' )->andReturn ($ options = clone $ this ->options );
107107 self ::assertNotSame ($ this ->options , $ options );
108- self ::assertSame ('foo ' , $ this ->connector ->fetch ($ this ->context , ' baz ' ));
108+ self ::assertSame ('foo ' , $ this ->connector ->fetch (' baz ' , $ this ->context ));
109109
110110 // Ensure new options have really taken effect by changing option. Cache should no longer be used.
111111 $ options ->setFoo ('bar ' );
112- self ::assertSame ('bar ' , $ this ->connector ->fetch ($ this ->context , ' baz ' ));
112+ self ::assertSame ('bar ' , $ this ->connector ->fetch (' baz ' , $ this ->context ));
113113 }
114114
115115 public function testNullAndEmptyOptionsAreEquivalent (): void
@@ -119,8 +119,8 @@ public function testNullAndEmptyOptionsAreEquivalent(): void
119119 $ this ->wrappedConnector ->shouldReceive ('getOptions ' )->andReturn ($ options );
120120 self ::assertEmpty ($ this ->wrappedConnector ->getOptions ()->copy ());
121121
122- self ::assertSame ('foo ' , $ this ->connector ->fetch ($ this ->context , ' baz ' ));
123- self ::assertSame ('foo ' , $ this ->connector ->fetch ($ this ->context , ' baz ' ));
122+ self ::assertSame ('foo ' , $ this ->connector ->fetch (' baz ' , $ this ->context ));
123+ self ::assertSame ('foo ' , $ this ->connector ->fetch (' baz ' , $ this ->context ));
124124 }
125125
126126 /**
@@ -145,7 +145,7 @@ function ($key) use ($reservedCharacters): void {
145145 ->shouldReceive ('set ' )->andReturn (\Mockery::mock (CacheItemInterface::class))
146146 ;
147147
148- $ connector ->fetch ($ this ->context , $ reservedCharacters );
148+ $ connector ->fetch ($ reservedCharacters , $ this ->context );
149149 }
150150
151151 /**
@@ -163,9 +163,9 @@ public function testCacheKeyGenerator(): void
163163 ->getMock ()
164164 );
165165
166- self ::assertSame ('foo ' , $ connector ->fetch ($ this ->context , $ source ));
167- self ::assertSame ('foo ' , $ connector ->fetch ($ this ->context , $ source ));
168- self ::assertSame ('bar ' , $ connector ->fetch ($ this ->context , $ source ));
166+ self ::assertSame ('foo ' , $ connector ->fetch ($ source , $ this ->context ));
167+ self ::assertSame ('foo ' , $ connector ->fetch ($ source , $ this ->context ));
168+ self ::assertSame ('bar ' , $ connector ->fetch ($ source , $ this ->context ));
169169 }
170170
171171 public function testFetchThrowsInvalidCacheKeyExceptionOnNonPSR6CompliantCacheKey (): void
@@ -180,7 +180,7 @@ public function testFetchThrowsInvalidCacheKeyExceptionOnNonPSR6CompliantCacheKe
180180
181181 $ this ->expectException (InvalidCacheKeyException::class);
182182 $ this ->expectExceptionMessage ('contains one or more reserved characters ' );
183- $ connector ->fetch ($ this ->context , ' baz ' );
183+ $ connector ->fetch (' baz ' , $ this ->context );
184184 }
185185
186186 /**
0 commit comments