22
33namespace JiraRestApi \Test ;
44
5+ use JiraRestApi \Issue \IssueService ;
56use PHPUnit \Framework \TestCase ;
67use JiraRestApi \Dumper ;
78use JiraRestApi \Field \Field ;
1011
1112class CustomFieldsTest extends TestCase
1213{
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+
1345 public function testGetFields ()
1446 {
1547 try {
@@ -26,6 +58,7 @@ public function testGetFields()
2658 return $ matches [0 ];
2759 }, $ ret );
2860
61+ $ this ->assertTrue (true );
2962 return $ ids ;
3063
3164 } catch (JiraException $ e ) {
@@ -49,6 +82,7 @@ public function testGetFieldOptions($ids)
4982 Dumper::dump ($ ret );
5083 }catch (JiraException $ e ) {}
5184 }
85+ $ this ->assertTrue (true );
5286 } catch (JiraException $ e ) {
5387 $ this ->assertTrue (false , 'testGetFieldOptions Failed : ' .$ e ->getMessage ());
5488 }
@@ -69,6 +103,9 @@ public function testCreateFields()
69103 $ fieldService = new FieldService ();
70104
71105 $ ret = $ fieldService ->create ($ field );
106+
107+ $ this ->assertTrue (true );
108+
72109 Dumper::dump ($ ret );
73110 } catch (JiraException $ e ) {
74111 $ this ->assertTrue (false , 'Field Create Failed : ' .$ e ->getMessage ());
0 commit comments