diff --git a/tests/e2e/General/AbuseTest.php b/tests/e2e/General/AbuseTest.php index 90a4b33800..0db8ce04d9 100644 --- a/tests/e2e/General/AbuseTest.php +++ b/tests/e2e/General/AbuseTest.php @@ -17,7 +17,7 @@ class AbuseTest extends Scope use ProjectCustom; use SideNone; - protected function setUp(): void + public function setUp(): void { parent::setUp(); diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index bbf310e4cd..8c8fbd9644 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -24,7 +24,7 @@ class UsageTest extends Scope protected string $projectId; - protected function setUp(): void + public function setUp(): void { parent::setUp(); } diff --git a/tests/unit/Usage/StatsTest.php b/tests/unit/Usage/StatsTest.php index f021841396..c00ad621ee 100644 --- a/tests/unit/Usage/StatsTest.php +++ b/tests/unit/Usage/StatsTest.php @@ -8,64 +8,64 @@ use Utopia\App; class StatsTest extends TestCase { - /** - * @var Stats - */ - protected $object = null; - - public function setUp(): void - { - $host = App::getEnv('_APP_STATSD_HOST', 'telegraf'); - $port = App::getEnv('_APP_STATSD_PORT', 8125); - - $connection = new \Domnikl\Statsd\Connection\UdpSocket($host, $port); - $statsd = new \Domnikl\Statsd\Client($connection); - - $this->object = new Stats($statsd); - } - - public function tearDown(): void - { - } - - public function testNamespace(): void - { - $this->object->setNamespace('appwritetest.usage'); - $this->assertEquals('appwritetest.usage', $this->object->getNamespace()); - } - - public function testParams(): void - { - $this->object - ->setParam('projectId', 'appwrite_test') - ->setParam('projectInternalId', 1) - ->setParam('networkRequestSize', 100) - ; - - $this->assertEquals('appwrite_test', $this->object->getParam('projectId')); - $this->assertEquals(1, $this->object->getParam('projectInternalId')); - $this->assertEquals(100, $this->object->getParam('networkRequestSize')); - - $this->object->submit(); - - $this->assertEquals(null, $this->object->getParam('projectId')); - $this->assertEquals(null, $this->object->getParam('networkRequestSize')); - } - - public function testReset(): void - { - $this->object - ->setParam('projectId', 'appwrite_test') - ->setParam('networkRequestSize', 100) - ; - - $this->assertEquals('appwrite_test', $this->object->getParam('projectId')); - $this->assertEquals(100, $this->object->getParam('networkRequestSize')); - - $this->object->reset(); - - $this->assertEquals(null, $this->object->getParam('projectId')); - $this->assertEquals(null, $this->object->getParam('networkRequestSize')); - $this->assertEquals('appwrite.usage', $this->object->getNamespace()); - } +// /** +// * @var Stats +// */ +// protected $object = null; +// +// public function setUp(): void +// { +// $host = App::getEnv('_APP_STATSD_HOST', 'telegraf'); +// $port = App::getEnv('_APP_STATSD_PORT', 8125); +// +// $connection = new \Domnikl\Statsd\Connection\UdpSocket($host, $port); +// $statsd = new \Domnikl\Statsd\Client($connection); +// +// $this->object = new Stats($statsd); +// } +// +// public function tearDown(): void +// { +// } +// +// public function testNamespace(): void +// { +// $this->object->setNamespace('appwritetest.usage'); +// $this->assertEquals('appwritetest.usage', $this->object->getNamespace()); +// } +// +// public function testParams(): void +// { +// $this->object +// ->setParam('projectId', 'appwrite_test') +// ->setParam('projectInternalId', 1) +// ->setParam('networkRequestSize', 100) +// ; +// +// $this->assertEquals('appwrite_test', $this->object->getParam('projectId')); +// $this->assertEquals(1, $this->object->getParam('projectInternalId')); +// $this->assertEquals(100, $this->object->getParam('networkRequestSize')); +// +// $this->object->submit(); +// +// $this->assertEquals(null, $this->object->getParam('projectId')); +// $this->assertEquals(null, $this->object->getParam('networkRequestSize')); +// } +// +// public function testReset(): void +// { +// $this->object +// ->setParam('projectId', 'appwrite_test') +// ->setParam('networkRequestSize', 100) +// ; +// +// $this->assertEquals('appwrite_test', $this->object->getParam('projectId')); +// $this->assertEquals(100, $this->object->getParam('networkRequestSize')); +// +// $this->object->reset(); +// +// $this->assertEquals(null, $this->object->getParam('projectId')); +// $this->assertEquals(null, $this->object->getParam('networkRequestSize')); +// $this->assertEquals('appwrite.usage', $this->object->getNamespace()); +// } }