File tree Expand file tree Collapse file tree 5 files changed +36
-2
lines changed Expand file tree Collapse file tree 5 files changed +36
-2
lines changed Original file line number Diff line number Diff line change @@ -6,4 +6,4 @@ for file in $FILES; do
6
6
./vendor/bin/phpcs --extensions=php --standard=PSR12 " $file "
7
7
./vendor/bin/phpmd " $file " text phpmd.xml
8
8
done
9
- XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-text --coverage-filter=src/ tests/
9
+ XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-text --coverage-filter=src/ tests/Unit/
Original file line number Diff line number Diff line change 33
33
run : ./vendor/bin/phpmd . text phpmd.xml --exclude vendor
34
34
35
35
- name : Test
36
- run : XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-clover coverage.xml --coverage-filter src/ tests/
36
+ run : XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-clover coverage.xml --coverage-filter src/ tests/Unit
37
37
38
38
- name : codecov
39
39
uses : codecov/codecov-action@v2
Original file line number Diff line number Diff line change @@ -61,4 +61,14 @@ public function create(array $data)
61
61
$ response = $ this ->core ->request ('CreateIssue ' , $ data );
62
62
return $ response ['Issue ' ];
63
63
}
64
+
65
+ public function delete (array $ data )
66
+ {
67
+ $ this ->validate ($ data , [
68
+ 'ProjectName ' => 'string|required ' ,
69
+ 'IssueCode ' => 'integer|required ' ,
70
+ ]);
71
+ $ this ->core ->request ('DeleteIssue ' , $ data );
72
+ return true ;
73
+ }
64
74
}
Original file line number Diff line number Diff line change @@ -90,4 +90,23 @@ public function testCreateSuccessWithAllParams()
90
90
$ result = $ issue ->create ($ data );
91
91
$ this ->assertEquals ($ response ['Issue ' ], $ result );
92
92
}
93
+
94
+ public function testDelete ()
95
+ {
96
+ $ response = json_decode (
97
+ file_get_contents ($ this ->dataPath ('DeleteIssueResponse.json ' )),
98
+ true
99
+ )['Response ' ];
100
+ $ data = [
101
+ 'ProjectName ' => $ this ->projectName ,
102
+ 'IssueCode ' => $ this ->faker ->randomNumber (),
103
+ ];
104
+ $ this ->coreMock ->shouldReceive ('request ' )->times (1 )->withArgs ([
105
+ 'DeleteIssue ' ,
106
+ $ data
107
+ ])->andReturn ($ response );
108
+
109
+ $ issue = new Issue ($ this ->token , $ this ->coreMock );
110
+ $ this ->assertTrue ($ issue ->delete ($ data ));
111
+ }
93
112
}
Original file line number Diff line number Diff line change
1
+ {
2
+ "Response" : {
3
+ "RequestId" : " 135f80f0-0577-6421-293e-ec231ff3b337"
4
+ }
5
+ }
You can’t perform that action at this time.
0 commit comments