@@ -178,7 +178,7 @@ public function testDynamicConnectionWithNoNameDoesntFailOnReconnect()
178178 }
179179
180180 #[DataProvider('readWriteExpectations ' )]
181- public function testItCanAccessLastReadWriteConnectionTypeRetrieved (string $ connectionName , array $ expectedTypes , ?string $ loggedType )
181+ public function testReadWriteTypeIsProvidedInQueryExecutedEventAndQueryLog (string $ connectionName , array $ expectedTypes , ?string $ loggedType )
182182 {
183183 $ readPath = __DIR__ .'/read.sqlite ' ;
184184 $ writePath = __DIR__ .'/write.sqlite ' ;
@@ -213,6 +213,7 @@ public function testItCanAccessLastReadWriteConnectionTypeRetrieved(string $conn
213213 $ connection ->select ('select 1 ' );
214214 $ this ->assertSame (array_shift ($ expectedTypes ), $ events ->shift ()->readWriteType );
215215
216+ $ this ->assertEmpty ($ events );
216217 $ this ->assertSame ([
217218 ['query ' => 'select 1 ' , 'readWriteType ' => $ loggedType ?? 'write ' ],
218219 ['query ' => 'select 1 ' , 'readWriteType ' => $ loggedType ?? 'read ' ],
@@ -234,7 +235,7 @@ public static function readWriteExpectations(): iterable
234235 yield 'sqlite::write ' => ['sqlite::write ' , ['write ' , 'write ' , 'write ' , 'write ' ], 'write ' ];
235236 }
236237
237- public function testNonReadWriteConnectionsAlwaysUseWrite ()
238+ public function testConnectionsWithoutReadWriteConfigurationAlwaysShowAsWrite ()
238239 {
239240 $ writePath = __DIR__ .'/write.sqlite ' ;
240241 Config::set ('database.connections.sqlite ' , [
@@ -265,7 +266,7 @@ public function testNonReadWriteConnectionsAlwaysUseWrite()
265266 }
266267 }
267268
268- public function testQueryExceptionsCaptureReadWriteType ()
269+ public function testQueryExceptionsProviderReadWriteType ()
269270 {
270271 $ readPath = __DIR__ .'/read.sqlite ' ;
271272 $ writePath = __DIR__ .'/write.sqlite ' ;
0 commit comments