Skip to content

Commit

Permalink
framework::App -> Http
Browse files Browse the repository at this point in the history
  • Loading branch information
shimonewman committed Jun 5, 2024
1 parent bb08b28 commit 877d188
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions tests/Detector/DetectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Utopia\Tests;

use PHPUnit\Framework\TestCase;
use Utopia\App;
use Utopia\Http\Http;
use Utopia\Cache\Adapter\None;
use Utopia\Cache\Cache;
use Utopia\Detector\Adapter\Bun;
Expand Down Expand Up @@ -53,9 +53,9 @@ public function detect($files, $languages): ?string
public function setUp(): void
{
$this->github = new GitHub(new Cache(new None()));
$privateKey = App::getEnv('PRIVATE_KEY') ?? '';
$githubAppId = App::getEnv('APP_IDENTIFIER') ?? '';
$installationId = App::getEnv('INSTALLATION_ID') ?? '';
$privateKey = Http::getEnv('PRIVATE_KEY') ?? '';
$githubAppId = Http::getEnv('APP_IDENTIFIER') ?? '';
$installationId = Http::getEnv('INSTALLATION_ID') ?? '';
$this->github->initializeVariables($installationId, $privateKey, $githubAppId);
}

Expand Down
8 changes: 4 additions & 4 deletions tests/VCS/Adapter/GitHubTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Utopia\Tests\VCS\Adapter;

use Utopia\App;
use Utopia\Http\Http;
use Utopia\Cache\Adapter\None;
use Utopia\Cache\Cache;
use Utopia\Tests\Base;
Expand All @@ -19,9 +19,9 @@ protected function createVCSAdapter(): Git
public function setUp(): void
{
$this->vcsAdapter = new GitHub(new Cache(new None()));
$privateKey = App::getEnv('PRIVATE_KEY') ?? '';
$githubAppId = App::getEnv('APP_IDENTIFIER') ?? '';
$installationId = App::getEnv('INSTALLATION_ID') ?? '';
$privateKey = Http::getEnv('PRIVATE_KEY') ?? '';
$githubAppId = Http::getEnv('APP_IDENTIFIER') ?? '';
$installationId = Http::getEnv('INSTALLATION_ID') ?? '';
$this->vcsAdapter->initializeVariables($installationId, $privateKey, $githubAppId);
}

Expand Down
4 changes: 2 additions & 2 deletions tests/VCS/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Exception;
use PHPUnit\Framework\TestCase;
use Utopia\App;
use Utopia\Http\Http;
use Utopia\VCS\Adapter\Git;

abstract class Base extends TestCase
Expand Down Expand Up @@ -41,7 +41,7 @@ public function testGetPullRequestFromBranch(): void

public function testGetOwnerName(): void
{
$installationId = App::getEnv('INSTALLATION_ID') ?? '';
$installationId = Http::getEnv('INSTALLATION_ID') ?? '';
$owner = $this->vcsAdapter->getOwnerName($installationId);
$this->assertEquals('test-kh', $owner);
}
Expand Down

0 comments on commit 877d188

Please sign in to comment.