File tree 1 file changed +35
-0
lines changed
1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Tests \Acceptance ;
4
+
5
+ use Coding \Iteration ;
6
+
7
+ class IterationTest extends TestCase
8
+ {
9
+ public function testCrud ()
10
+ {
11
+ $ data = [
12
+ 'ProjectName ' => $ this ->projectName ,
13
+ 'Name ' => $ this ->faker ->sentence (2 ),
14
+ ];
15
+
16
+ $ iteration = new Iteration ($ this ->token );
17
+ $ createResult = $ iteration ->create ($ data );
18
+ $ this ->assertTrue (is_numeric ($ createResult ['Code ' ]));
19
+
20
+ $ params = [
21
+ 'ProjectName ' => $ this ->projectName ,
22
+ 'IterationCode ' => $ createResult ['Code ' ],
23
+ ];
24
+ $ getResult = $ iteration ->get ($ params );
25
+ $ this ->assertEquals ($ createResult ['Name ' ], $ getResult ['Name ' ]);
26
+
27
+ $ name = $ this ->faker ->sentence (2 );
28
+ $ updateResult = $ iteration ->update (array_merge ($ params , [
29
+ 'Name ' => $ name ,
30
+ ]));
31
+ $ this ->assertEquals ($ name , $ updateResult ['Name ' ]);
32
+
33
+ $ this ->assertTrue ($ iteration ->delete ($ params ));
34
+ }
35
+ }
You can’t perform that action at this time.
0 commit comments