File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5656 " @php -r \" file_exists('.env') || copy('.env.example', '.env');\" "
5757 ],
5858 "test:unit" : " phpunit" ,
59- "test:type" : " phpstan analyse --ansi" ,
59+ "test:type" : " phpstan analyse --ansi --no-progress " ,
6060 "test" : [
61- " @test:unit" ,
6261 " @test:type"
6362 ]
6463 },
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ require __dir__.'/vendor/autoload.php ' ;
4+ use Supabase \Client ;
5+
6+ $ client = Client::connect ();
7+ $ client ->setURL ('https://supabase.co ' );
8+ $ client ->setApiKey ('fsvbg ' );
Original file line number Diff line number Diff line change 1+ parameters:
2+ level: max
3+ paths:
4+ - src
5+
6+ reportUnmatchedIgnoredErrors: true
7+
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3+ xsi : noNamespaceSchemaLocation =" vendor/phpunit/phpunit/phpunit.xsd"
4+ bootstrap =" vendor/autoload.php"
5+ cacheDirectory =" .phpunit.cache"
6+ executionOrder =" depends,defects"
7+ requireCoverageMetadata =" true"
8+ beStrictAboutCoverageMetadata =" true"
9+ beStrictAboutOutputDuringTests =" true"
10+ displayDetailsOnPhpunitDeprecations =" true"
11+ failOnPhpunitDeprecation =" true"
12+ failOnRisky =" true"
13+ failOnWarning =" true"
14+ colors =" true" >
15+ <testsuites >
16+ <testsuite name =" default" >
17+ <directory >tests</directory >
18+ </testsuite >
19+ </testsuites >
20+
21+ <source ignoreIndirectDeprecations =" true" restrictNotices =" true" restrictWarnings =" true" >
22+ <include >
23+ <directory >src</directory >
24+ </include >
25+ </source >
26+ </phpunit >
Original file line number Diff line number Diff line change 1+ <?php declare (strict_types=1 );
2+
3+ namespace Supabase ;
4+
5+ class Client extends Supabase
6+ {
7+ /*
8+ /**
9+ * @var object Supabase
10+ */
11+ // protected object $supabase;
12+
13+ /*
14+ * @var string Supabase URL
15+ */
16+ // protected string $url;
17+
18+ /*
19+ * @var string Supabase API KEY
20+ */
21+ // protected string $apiKey;
22+
23+ public function __construct ()
24+ {
25+ // $this->supabase = new Supabase($this->url, $this->apiKey);
26+ }
27+ /*
28+ public function setURL(string $url): string
29+ {
30+ return $this->url = $url;
31+ }
32+
33+ public function setApiKey(string $key): string
34+ {
35+ return $this->apiKey = $key;
36+ }
37+ */
38+ }
Original file line number Diff line number Diff line change 1+ <?php declare (strict_types=1 );
2+
3+ namespace Supabase ;
4+
5+ class Supabase
6+ {
7+ /* public function __construct(string $url, string $key)
8+ {
9+ //
10+ }
11+ */
12+ }
Original file line number Diff line number Diff line change 1+ <?php declare (strict_types=1 );
2+
3+ namespace Tests ;
4+
5+ use PHPUnit \Framework \Attributes \CoversClass ;
6+ use PHPUnit \Framework \Attributes \Test ;
7+ use PHPUnit \Framework \TestCase ;
8+ use InvalidArgumentException ;
9+ use Supabase \Client ;
10+
11+ #[CoversClass(Client::class)]
12+ class SupabaseClientTest extends TestCase
13+ {
14+ /**
15+ * @var object supabase client
16+ */
17+ private Client $ client ;
18+
19+ #[Test]
20+ protected function setUp (): void
21+ {
22+ $ this ->client = new Client ();
23+ $ this ->assertInstanceOf (Client::class, $ this ->client );
24+ $ this ->assertSame (Client::class, get_class ($ this ->client ));
25+
26+ }
27+
28+ /*
29+ #[Test]
30+ public function connect()
31+ {
32+ $this->assertSame('supabase', $this->client);
33+ } */
34+ }
You can’t perform that action at this time.
0 commit comments