We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8078ec0 commit 71c4759Copy full SHA for 71c4759
1 file changed
tests/Setup.php
@@ -0,0 +1,28 @@
1
+<?php declare(strict_types=1);
2
+
3
+use PHPUnit\Framework\Attributes\CoversClass;
4
+use PHPUnit\Framework\Attributes\Test;
5
+use PHPUnit\Framework\TestCase;
6
+use Supabase\Client;
7
8
+#[CoversClass(Client::class)]
9
+class Setup extends TestCase
10
+{
11
+ #[Test]
12
+ public function testConstructorSetsUrlAndApiKey(): void
13
+ {
14
+ $url = 'https://test.supabase.io';
15
+ $apiKey = 'test-api-key';
16
17
+ $client = new Client($url, $apiKey);
18
19
+ $urlProp = new \ReflectionProperty(Client::class, 'url');
20
+ $urlProp->setAccessible(true);
21
22
+ $apiKeyProp = new \ReflectionProperty(Client::class, 'apiKey');
23
+ $apiKeyProp->setAccessible(true);
24
25
+ $this->assertEquals($url, $urlProp->getValue($client));
26
+ $this->assertEquals($apiKey, $apiKeyProp->getValue($client));
27
+ }
28
+}
0 commit comments