File tree 1 file changed +28
-0
lines changed
1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -515,4 +515,32 @@ public function testCreateIssueWithTags() {
515
515
516
516
self ::assertEquals ( 2 , count ( $ issue ->tags ) );
517
517
}
518
+
519
+ /**
520
+ * Tests that an issue with enumerated fields set by name has the field values correctly set
521
+ *
522
+ */
523
+ public function testCreateIssueWithFieldsByName () {
524
+ $ issueToAdd = $ this ->getIssueToAdd ( 'IssueAddTest.testCreateIssueWithFieldsByName ' );
525
+
526
+ $ issueToAdd ['view_state ' ] = array ( 'name ' => 'private ' );
527
+ $ issueToAdd ['resolution ' ] = array ( 'name ' => 'suspended ' );
528
+ $ issueToAdd ['status ' ] = array ( 'name ' => 'confirmed ' );
529
+
530
+ $ issueId = $ this ->client ->mc_issue_add (
531
+ $ this ->userName ,
532
+ $ this ->password ,
533
+ $ issueToAdd );
534
+
535
+ $ this ->deleteAfterRun ( $ issueId );
536
+
537
+ $ issue = $ this ->client ->mc_issue_get (
538
+ $ this ->userName ,
539
+ $ this ->password ,
540
+ $ issueId );
541
+
542
+ $ this ->assertEquals ( $ issueToAdd ['view_state ' ]['name ' ], $ issue ->view_state ->name );
543
+ $ this ->assertEquals ( $ issueToAdd ['resolution ' ]['name ' ], $ issue ->resolution ->name );
544
+ $ this ->assertEquals ( $ issueToAdd ['status ' ]['name ' ], $ issue ->status ->name );
545
+ }
518
546
}
You can’t perform that action at this time.
0 commit comments