File tree 3 files changed +34
-0
lines changed
3 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -27,4 +27,14 @@ public function get(array $data)
27
27
$ response = $ this ->core ->request ('DescribeIteration ' , $ data );
28
28
return $ response ['Iteration ' ];
29
29
}
30
+
31
+ public function delete (array $ data )
32
+ {
33
+ $ this ->validate ($ data , [
34
+ 'ProjectName ' => 'string|required ' ,
35
+ 'IterationCode ' => 'integer|required ' ,
36
+ ]);
37
+ $ this ->core ->request ('DeleteIteration ' , $ data );
38
+ return true ;
39
+ }
30
40
}
Original file line number Diff line number Diff line change @@ -122,4 +122,23 @@ public function testGet()
122
122
$ result = $ iteration ->get ($ data );
123
123
$ this ->assertEquals ($ response ['Iteration ' ], $ result );
124
124
}
125
+
126
+ public function testDelete ()
127
+ {
128
+ $ response = json_decode (
129
+ file_get_contents ($ this ->dataPath ('DeleteIterationResponse.json ' )),
130
+ true
131
+ )['Response ' ];
132
+ $ data = [
133
+ 'ProjectName ' => $ this ->projectName ,
134
+ 'IterationCode ' => $ this ->faker ->randomNumber (),
135
+ ];
136
+ $ this ->coreMock ->shouldReceive ('request ' )->times (1 )->withArgs ([
137
+ 'DeleteIteration ' ,
138
+ $ data
139
+ ])->andReturn ($ response );
140
+
141
+ $ issue = new Iteration ($ this ->token , $ this ->coreMock );
142
+ $ this ->assertTrue ($ issue ->delete ($ data ));
143
+ }
125
144
}
Original file line number Diff line number Diff line change
1
+ {
2
+ "Response" : {
3
+ "RequestId" : " 84cb9b6c-aa70-083a-e87e-436145ec4259"
4
+ }
5
+ }
You can’t perform that action at this time.
0 commit comments