2
2
3
3
namespace JiraRestApi \Test ;
4
4
5
+ use JiraRestApi \Issue \IssueService ;
5
6
use PHPUnit \Framework \TestCase ;
6
7
use JiraRestApi \Dumper ;
7
8
use JiraRestApi \Field \Field ;
10
11
11
12
class CustomFieldsTest extends TestCase
12
13
{
14
+ /**
15
+ * @Test
16
+ *
17
+ * @return array|string[]|void
18
+ */
19
+ public function get_customer_field ()
20
+ {
21
+ try {
22
+ $ iss = new IssueService ();
23
+
24
+ $ paramArray = [
25
+ 'startAt ' => 1 ,
26
+ 'maxResults ' => 50 ,
27
+ 'search ' => null ,
28
+ 'projectIds ' => [1 , 2 , 3 ],
29
+ 'screenIds ' => null ,
30
+ 'types ' => null ,
31
+
32
+ 'sortOrder ' => null ,
33
+ 'sortColumn ' => null ,
34
+ 'lastValueUpdate ' => null ,
35
+ ];
36
+ $ customerFieldSearchResult = $ iss ->getCustomFields ($ paramArray );
37
+
38
+ $ this ->assertLessThan (1 , $ customerFieldSearchResult ->total );
39
+
40
+ } catch (JiraException $ e ) {
41
+ $ this ->assertTrue (false , 'testSearch Failed : ' .$ e ->getMessage ());
42
+ }
43
+ }
44
+
13
45
public function testGetFields ()
14
46
{
15
47
try {
@@ -26,6 +58,7 @@ public function testGetFields()
26
58
return $ matches [0 ];
27
59
}, $ ret );
28
60
61
+ $ this ->assertTrue (true );
29
62
return $ ids ;
30
63
31
64
} catch (JiraException $ e ) {
@@ -49,6 +82,7 @@ public function testGetFieldOptions($ids)
49
82
Dumper::dump ($ ret );
50
83
}catch (JiraException $ e ) {}
51
84
}
85
+ $ this ->assertTrue (true );
52
86
} catch (JiraException $ e ) {
53
87
$ this ->assertTrue (false , 'testGetFieldOptions Failed : ' .$ e ->getMessage ());
54
88
}
@@ -69,6 +103,9 @@ public function testCreateFields()
69
103
$ fieldService = new FieldService ();
70
104
71
105
$ ret = $ fieldService ->create ($ field );
106
+
107
+ $ this ->assertTrue (true );
108
+
72
109
Dumper::dump ($ ret );
73
110
} catch (JiraException $ e ) {
74
111
$ this ->assertTrue (false , 'Field Create Failed : ' .$ e ->getMessage ());
0 commit comments