@@ -56,7 +56,8 @@ public function setUp()
5656 public function testOpen ()
5757 {
5858 $ this ->connection ->beginTransaction (['database ' => $ this ->dbName ()])
59- ->shouldBeCalledTimes (1 );
59+ ->shouldBeCalledTimes (1 )
60+ ->willReturn (['transaction ' => 123 ]);;
6061 $ firestoreSessionHandler = new FirestoreSessionHandler (
6162 $ this ->connection ->reveal (),
6263 $ this ->valueMapper ->reveal (),
@@ -90,6 +91,9 @@ public function testOpenWithException()
9091 */
9192 public function testReadNotAllowed ()
9293 {
94+ $ this ->connection ->beginTransaction (['database ' => $ this ->dbName ()])
95+ ->shouldBeCalledTimes (1 )
96+ ->willThrow (new ServiceException ('' ));
9397 $ firestoreSessionHandler = new FirestoreSessionHandler (
9498 $ this ->connection ->reveal (),
9599 $ this ->valueMapper ->reveal (),
@@ -124,7 +128,8 @@ public function testReadNothing()
124128 ->shouldBeCalledTimes (1 )
125129 ->willReturn (null );
126130 $ this ->connection ->beginTransaction (['database ' => $ this ->dbName ()])
127- ->shouldBeCalledTimes (1 );
131+ ->shouldBeCalledTimes (1 )
132+ ->willReturn (['transaction ' => 123 ]);
128133 $ this ->connection ->batchGetDocuments ([
129134 'database ' => $ this ->dbName (),
130135 'documents ' => [$ this ->documentName ()],
@@ -150,7 +155,8 @@ public function testReadNothing()
150155 public function testReadWithException ()
151156 {
152157 $ this ->connection ->beginTransaction (['database ' => $ this ->dbName ()])
153- ->shouldBeCalledTimes (1 );
158+ ->shouldBeCalledTimes (1 )
159+ ->willReturn (['transaction ' => 123 ]);
154160 $ this ->connection ->batchGetDocuments ([
155161 'database ' => $ this ->dbName (),
156162 'documents ' => [$ this ->documentName ()],
@@ -217,7 +223,8 @@ public function testWrite()
217223 return ['data ' => ['stringValue ' => 'sessiondata ' ]];
218224 });
219225 $ this ->connection ->beginTransaction (['database ' => $ this ->dbName ()])
220- ->shouldBeCalledTimes (1 );
226+ ->shouldBeCalledTimes (1 )
227+ ->willReturn (['transaction ' => 123 ]);
221228 $ this ->connection ->commit ([
222229 'database ' => $ this ->dbName (),
223230 'writes ' => [
0 commit comments