rename App:: to Http::

This commit is contained in:
Damodar Lohani
2023-07-18 01:56:00 +00:00
parent 9ab8c49747
commit 49dfbff4c6
50 changed files with 641 additions and 663 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ class AbuseTest extends Scope
{
parent::setUp();
if (App::getEnv('_APP_OPTIONS_ABUSE') === 'disabled') {
if (Http::getEnv('_APP_OPTIONS_ABUSE') === 'disabled') {
$this->markTestSkipped('Abuse is not enabled.');
}
}
+3 -3
View File
@@ -21,7 +21,7 @@ class AbuseTest extends Scope
{
parent::setUp();
if (App::getEnv('_APP_OPTIONS_ABUSE') === 'disabled') {
if (Http::getEnv('_APP_OPTIONS_ABUSE') === 'disabled') {
$this->markTestSkipped('Abuse is not enabled.');
}
}
@@ -90,7 +90,7 @@ class AbuseTest extends Scope
'x-appwrite-project' => $projectId,
], $this->getHeaders()), $graphQLPayload);
$max = App::getEnv('_APP_GRAPHQL_MAX_QUERY_COMPLEXITY', 250);
$max = Http::getEnv('_APP_GRAPHQL_MAX_QUERY_COMPLEXITY', 250);
$this->assertEquals('Max query complexity should be ' . $max . ' but got 259.', $response['body']['errors'][0]['message']);
}
@@ -98,7 +98,7 @@ class AbuseTest extends Scope
public function testTooManyQueriesBlocked()
{
$projectId = $this->getProject()['$id'];
$maxQueries = App::getEnv('_APP_GRAPHQL_MAX_QUERIES', 10);
$maxQueries = Http::getEnv('_APP_GRAPHQL_MAX_QUERIES', 10);
$query = [];
for ($i = 0; $i <= $maxQueries + 1; $i++) {
+2 -2
View File
@@ -14,8 +14,8 @@ class EventTest extends TestCase
public function setUp(): void
{
$redisHost = App::getEnv('_APP_REDIS_HOST', '');
$redisPort = App::getEnv('_APP_REDIS_PORT', '');
$redisHost = Http::getEnv('_APP_REDIS_HOST', '');
$redisPort = Http::getEnv('_APP_REDIS_PORT', '');
\Resque::setBackend($redisHost . ':' . $redisPort);
$this->queue = 'v1-tests' . uniqid();
+2 -2
View File
@@ -15,8 +15,8 @@ class StatsTest extends TestCase
public function setUp(): void
{
$host = App::getEnv('_APP_STATSD_HOST', 'telegraf');
$port = App::getEnv('_APP_STATSD_PORT', 8125);
$host = Http::getEnv('_APP_STATSD_HOST', 'telegraf');
$port = Http::getEnv('_APP_STATSD_PORT', 8125);
$connection = new \Domnikl\Statsd\Connection\UdpSocket($host, $port);
$statsd = new \Domnikl\Statsd\Client($connection);