Exemplo n.º 1
0
 /**
  * @depends testUpdateWorkLogInIssue
  */
 public function testGetWorkLogById($workLogid)
 {
     try {
         $issueService = new IssueService();
         $worklog = $issueService->getWorklogById($this->issueKey, $workLogid);
         Dumper::dump($worklog);
     } catch (JiraException $e) {
         $this->assertTrue(false, 'testGetWorkLogById Failed : ' . $e->getMessage());
     }
 }
Exemplo n.º 2
0
 public function testGetUser()
 {
     try {
         $us = new UserService();
         // get the user info.
         $user = $us->get(['username' => 'lesstif']);
         Dumper::dump($user);
     } catch (JiraException $e) {
         $this->assertTrue(false, 'testGetUser Failed : ' . $e->getMessage());
     }
 }
Exemplo n.º 3
0
 public function testGetIssue()
 {
     $issueKey = 'TEST-155';
     try {
         $issueService = new IssueService();
         $queryParam = ['fields' => ['summary', 'comment'], 'expand' => ['renderedFields', 'names', 'schema', 'transitions', 'operations', 'editmeta', 'changelog']];
         $issue = $issueService->get($issueKey, $queryParam);
         Dumper::dump($issue);
     } catch (JiraException $e) {
         $this->assertTrue(false, 'testSearch Failed : ' . $e->getMessage());
     }
 }
Exemplo n.º 4
0
 public function testCreateFields()
 {
     //$this->markTestSkipped();
     try {
         $field = new Field();
         $field->setName('New custom field')->setDescription('Custom field for picking groups')->setType('com.atlassian.jira.plugin.system.customfieldtypes:grouppicker')->setSearcherKey('com.atlassian.jira.plugin.system.customfieldtypes:grouppickersearcher');
         $fieldService = new FieldService();
         $ret = $fieldService->create($field);
         Dumper::dump($ret);
     } catch (JiraException $e) {
         $this->assertTrue(false, 'Field Create Failed : ' . $e->getMessage());
     }
 }
Exemplo n.º 5
0
 public function testGetProject()
 {
     //$this->markTestIncomplete();
     try {
         $proj = new ProjectService();
         $p = $proj->get('TEST');
         Dumper::dump($p);
         foreach ($p->components as $c) {
             echo 'COM : ' . $c->name . "\n";
         }
     } catch (HTTPException $e) {
         $this->assertTrue(false, $e->getMessage());
     }
 }
 public function testSerialize()
 {
     $r = new Reporter();
     $r->name = 'KwangSeob Jeong';
     $r->emailAddress = '*****@*****.**';
     $r->avatarUrls = 'http://my.avatar.com/avatarUrls';
     $r->displayName = 'lesstif';
     $d = $r->toArray(['name', 'emailAddress'], $excludeMode = true);
     Dumper::dump($d);
     // serialized array have not 'name' and 'emailAddress' keys.
     $this->assertEquals(false, array_key_exists('name', $d), '"name" key is exists!.');
     $this->assertEquals(false, array_key_exists('emailAddress', $d));
     $d = $r->toArray(['name', 'emailAddress'], $excludeMode = false);
     // serialized array must have only 'name' and 'emailAddress' keys.
     $this->assertEquals(true, array_key_exists('name', $d), '"name" key is not exists!.');
     $this->assertEquals(true, array_key_exists('emailAddress', $d));
     $this->assertEquals(2, count($d));
     Dumper::dump($d);
 }
Exemplo n.º 7
0
 /**
  * @depends testSearch
  */
 public function testCustomField()
 {
     $jql = 'project not in (TEST)  and assignee = currentUser() and status in (Resolved, closed)';
     try {
         $issueService = new IssueService();
         $ret = $issueService->search($jql);
         Dumper::dump($ret);
     } catch (JiraException $e) {
         $this->assertTrue(false, 'testSearch Failed : ' . $e->getMessage());
     }
 }