Permalink
Browse files

adding return values and fixing unittests

  • Loading branch information...
1 parent a01bad6 commit adb008e4a17edcbf3b202ced2d630cd4776dc2cf @nprasath002 committed Oct 13, 2012
Showing with 7 additions and 6 deletions.
  1. +3 −2 libraries/joomla/github/issues.php
  2. +4 −4 tests/suites/unit/joomla/github/JGithubIssuesTest.php
@@ -200,8 +200,6 @@ public function deleteLabel($user, $repo, $label)
$error = json_decode($response->body);
throw new DomainException($error->message, $response->code);
}
-
- return json_decode($response->body);
}
/**
@@ -513,6 +511,9 @@ public function getLabels($user, $repo)
$error = json_decode($response->body);
throw new DomainException($error->message, $response->code);
}
+
+
+ return json_decode($response->body);
}
/**
@@ -194,7 +194,7 @@ public function testCreateLabel()
->will($this->returnValue($returnData));
$this->assertThat(
- $this->object->createLabel('joomla', 'joomla-platform', 'Label', 'blue'),
+ $this->object->createLabel('joomla', 'joomla-platform', 'My Insightful Label', 'My Insightful Color'),
$this->equalTo(json_decode($this->sampleString))
);
}
@@ -221,7 +221,7 @@ public function testCreateLabelFailure()
->with('/repos/joomla/joomla-platform/labels', json_encode($issue))
->will($this->returnValue($returnData));
- $this->object->createLabel('joomla', 'joomla-platform', 'Label', 'blue');
+ $this->object->createLabel('joomla', 'joomla-platform', 'My Insightful Label', 'My Insightful Color');
}
/**
@@ -298,7 +298,7 @@ public function testDeleteLabelFailure()
$this->client->expects($this->once())
->method('delete')
- ->with('/repos/joomla/joomla-platform/issues/comments/254')
+ ->with('/repos/joomla/joomla-platform/labels/254')
->will($this->returnValue($returnData));
$this->object->deleteLabel('joomla', 'joomla-platform', 254);
@@ -628,7 +628,7 @@ public function testGetLabelFailure()
$this->client->expects($this->once())
->method('get')
- ->with('/repos/joomla/joomla-platform/issues/comments/523')
+ ->with('/repos/joomla/joomla-platform/labels/My Insightful Label')
->will($this->returnValue($returnData));
$this->object->getLabel('joomla', 'joomla-platform', 'My Insightful Label');

0 comments on commit adb008e

Please sign in to comment.