@@ -28,21 +28,21 @@ public function test_it_updates()
2828 $ this ->volume ->description = 'bar ' ;
2929
3030 $ expectedJson = ['volume ' => ['name ' => 'foo ' , 'description ' => 'bar ' ]];
31- $ this ->setupMock ('PUT ' , 'volumes/1 ' , $ expectedJson , [], ' GET_volume ' );
31+ $ this ->mockRequest ('PUT ' , 'volumes/1 ' , ' GET_volume ' , $ expectedJson , []);
3232
3333 $ this ->volume ->update ();
3434 }
3535
3636 public function test_it_deletes ()
3737 {
38- $ this ->setupMock ('DELETE ' , 'volumes/1 ' , null , [], new Response (204 ));
38+ $ this ->mockRequest ('DELETE ' , 'volumes/1 ' , new Response (204 ), null , [] );
3939
4040 $ this ->volume ->delete ();
4141 }
4242
4343 public function test_it_retrieves ()
4444 {
45- $ this ->setupMock ('GET ' , 'volumes/1 ' , null , [], ' GET_volume ' );
45+ $ this ->mockRequest ('GET ' , 'volumes/1 ' , ' GET_volume ' , null , []);
4646
4747 $ this ->volume ->retrieve ();
4848
@@ -67,15 +67,15 @@ public function test_it_retrieves()
6767
6868 public function test_it_merges_metadata ()
6969 {
70- $ this ->setupMock ('GET ' , 'volumes/1/metadata ' , null , [], ' GET_metadata ' );
70+ $ this ->mockRequest ('GET ' , 'volumes/1/metadata ' , ' GET_metadata ' , null , []);
7171
7272 $ expectedJson = ['metadata ' => [
7373 'foo ' => 'newFoo ' ,
7474 'bar ' => '2 ' ,
7575 'baz ' => 'bazVal ' ,
7676 ]];
7777
78- $ this ->setupMock ('PUT ' , 'volumes/1/metadata ' , $ expectedJson , [], ' GET_metadata ' );
78+ $ this ->mockRequest ('PUT ' , 'volumes/1/metadata ' , ' GET_metadata ' , $ expectedJson , []);
7979
8080 $ this ->volume ->mergeMetadata (['foo ' => 'newFoo ' , 'baz ' => 'bazVal ' ]);
8181 }
@@ -84,14 +84,14 @@ public function test_it_resets_metadata()
8484 {
8585 $ expectedJson = ['metadata ' => ['key1 ' => 'val1 ' ]];
8686
87- $ this ->setupMock ('PUT ' , 'volumes/1/metadata ' , $ expectedJson , [], ' GET_metadata ' );
87+ $ this ->mockRequest ('PUT ' , 'volumes/1/metadata ' , ' GET_metadata ' , $ expectedJson , []);
8888
8989 $ this ->volume ->resetMetadata (['key1 ' => 'val1 ' ]);
9090 }
9191
9292 public function test_it_sets_volume_bootable ()
9393 {
94- $ this ->setupMock ('POST ' , 'volumes/1/action ' , ['os-set_bootable ' => ['bootable ' => 'True ' ]], [], new Response ( 200 ) );
94+ $ this ->mockRequest ('POST ' , 'volumes/1/action ' , new Response ( 200 ), ['os-set_bootable ' => ['bootable ' => 'True ' ]], []);
9595
9696 $ this ->volume ->setBootable (true );
9797 }
@@ -107,7 +107,7 @@ public function test_it_sets_image_meta_data()
107107 ],
108108 ];
109109
110- $ this ->setupMock ('POST ' , 'volumes/1/action ' , $ expectedJson , [], new Response (200 ));
110+ $ this ->mockRequest ('POST ' , 'volumes/1/action ' , new Response (200 ), $ expectedJson , [] );
111111 $ this ->volume ->setImageMetadata ([
112112 'attr_foo ' => 'foofoo ' ,
113113 'attr_bar ' => 'barbar ' ,
@@ -118,7 +118,7 @@ public function test_it_resets_status()
118118 {
119119 $ expectedJson = ['os-reset_status ' => ['status ' => 'available ' , 'attach_status ' => 'detached ' , 'migration_status ' => 'migrating ' ]];
120120
121- $ this ->setupMock ('POST ' , 'volumes/1/action ' , $ expectedJson , [], new Response (202 ));
121+ $ this ->mockRequest ('POST ' , 'volumes/1/action ' , new Response (202 ), $ expectedJson , [] );
122122
123123 $ this ->volume ->resetStatus (
124124 [
0 commit comments