Skip to content

Commit

Permalink
Fix for composer
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphaelStArnaud committed Sep 21, 2015
1 parent 4b0849a commit d0d155d
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 9 deletions.
3 changes: 2 additions & 1 deletion src/BitbucketApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
* Bitbucket php API : http://gentlero.bitbucket.org/bitbucket-api/
*/

require_once 'vendor/autoload.php';
$path= realpath(__DIR__ . '/..');
require_once $path . '/vendor/autoload.php';

/**
* Allow communication with Bitbucket API
Expand Down
8 changes: 4 additions & 4 deletions tests/BitbucketApiTest.php → src/BitbucketApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ protected function setUp()
*/
public function testGetRepositoryCommits()
{
$res = $this->_api->getRepositoryCommits("rstarnaud", "testrepo");
$this->assertTrue($res == 4);
$res = $this->_api->getRepositoryCommits("jpcomeau", "orion_equipe");
$this->assertTrue($res == 30);
}

/**
Expand All @@ -49,8 +49,8 @@ public function testGetRepositoryCommits()
*/
public function testGetRepositoryContributors()
{
$res = count($this->_api->getRepositoryContributors("rstarnaud", "testrepo"));
$this->assertTrue($res == 1);
$res = count($this->_api->getRepositoryContributors("jpcomeau", "orion_equipe"));
$this->assertTrue($res == 5);
}

/**
Expand Down
5 changes: 3 additions & 2 deletions src/GithubApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
* Github php API : https://github.com/KnpLabs/php-github-api/tree/master/doc
*/

require_once 'vendor/autoload.php';
$path= realpath(__DIR__ . '/..');
require_once $path . '/vendor/autoload.php';

define("PROJECT_ID", "481460910115-q5ddd65u4d6hi74fkt1birhl9369scps@developer.gserviceaccount.com");
define("PROJECT_NAME", "maison-1048");
define("KEY_PATH", "key.p12");
define("KEY_PATH", __DIR__ . "/config/key.p12");

/**
* Allow communication with Github API
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tests/visualTestBitbucket.php → src/visualTestBitbucket.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
<h2> Commits </h2>

<?php
echo $api->getRepositoryCommits("rstarnaud","testrepo");
echo $api->getRepositoryCommits("jpcomeau","orion_equipe");
?>

<h2> Contributors </h2>

<?php
$contributors = $api->getRepositoryContributors("rstarnaud","testrepo");
$contributors = $api->getRepositoryContributors("jpcomeau","orion_equipe");

foreach($contributors as $contributor){
echo $contributor;
Expand Down
File renamed without changes.

0 comments on commit d0d155d

Please sign in to comment.