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)
7676 *
7777 * @return array|string
7878 */
79- public function delete (string $ id, array $ data )
79+ public function delete (string $ id )
8080 {
8181 $ url = $ this ->url ('plans/%s/delete ' , $ id );
8282
83- return $ this ->post ($ url , $ data );
83+ return $ this ->post ($ url , [] );
8484 }
8585
8686 /**
Original file line number Diff line number Diff line change @@ -91,6 +91,20 @@ public function should_unarchive_plan()
9191 $ this ->assertEquals ($ expected , $ plan ->unarchive ('basic_v2 ' ));
9292 }
9393
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+
94108 /**
95109 * @return string
96110 */
You can’t perform that action at this time.
0 commit comments