From c74af1e90f086ecfa6937829cd9690a5221b25cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Mo=CC=88ller?= Date: Fri, 6 Mar 2015 14:53:59 +0100 Subject: [PATCH] Fix: Method is misspelled, too --- src/EdpGithub/Api/Repos.php | 15 +++++++++++++-- test/EdpGithubTest/Api/ReposTest.php | 11 +++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/EdpGithub/Api/Repos.php b/src/EdpGithub/Api/Repos.php index 4cc1e69..d8c0d85 100644 --- a/src/EdpGithub/Api/Repos.php +++ b/src/EdpGithub/Api/Repos.php @@ -78,16 +78,27 @@ public function codeFrequency($owner, $repo) } /** - * Get partecipation * @param string $owner * @param string $repo * @return string */ - public function partecipation($owner, $repo) + public function participation($owner, $repo) { return $this->get('repos/' . $owner . '/' . $repo . '/stats/participation'); } + /** + * @deprecated + * + * @param string $owner + * @param string $repo + * @return string + */ + public function partecipation($owner, $repo) + { + return $this->participation($owner, $repo); + } + /** * Get punch card * @param string $owner diff --git a/test/EdpGithubTest/Api/ReposTest.php b/test/EdpGithubTest/Api/ReposTest.php index 947a2b4..ff263da 100644 --- a/test/EdpGithubTest/Api/ReposTest.php +++ b/test/EdpGithubTest/Api/ReposTest.php @@ -73,6 +73,17 @@ public function testCodeFrequency() $this->assertEquals($result, $expectedArray); } + public function testParticipation() + { + $expectedArray = array('id' => 1, 'name' => 'repo'); + $client = $this->getClientMock('repos/owner/repo/stats/participation', $expectedArray); + $api = new Repos(); + $api->setClient($client); + $result = $api->participation('owner', 'repo'); + + $this->assertEquals($result, $expectedArray); + } + public function testPartecipation() { $expectedArray = array('id' => 1, 'name' => 'repo');