File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -76,11 +76,11 @@ public function update(string $id, array $data)
76
76
*
77
77
* @return array|string
78
78
*/
79
- public function delete (string $ id, array $ data )
79
+ public function delete (string $ id )
80
80
{
81
81
$ url = $ this ->url ('plans/%s/delete ' , $ id );
82
82
83
- return $ this ->post ($ url , $ data );
83
+ return $ this ->post ($ url , [] );
84
84
}
85
85
86
86
/**
Original file line number Diff line number Diff line change @@ -91,6 +91,20 @@ public function should_unarchive_plan()
91
91
$ this ->assertEquals ($ expected , $ plan ->unarchive ('basic_v2 ' ));
92
92
}
93
93
94
+ /** @test */
95
+ public function should_delete_plan ()
96
+ {
97
+ $ expected = $ this ->getContent (sprintf ('%s/data/responses/plan_deleted.json ' , __DIR__ ));
98
+
99
+ $ plan = $ this ->getApiMock ();
100
+ $ plan ->expects ($ this ->once ())
101
+ ->method ('post ' )
102
+ ->with ('https://123456789.chargebee.com/api/v2/plans/silver/delete ' , [])
103
+ ->will ($ this ->returnValue ($ expected ));
104
+
105
+ $ this ->assertEquals ($ expected , $ plan ->delete ('silver ' ));
106
+ }
107
+
94
108
/**
95
109
* @return string
96
110
*/
You can’t perform that action at this time.
0 commit comments