Skip to content

Commit 6c528ba

Browse files
test pass
1 parent eb369d9 commit 6c528ba

File tree

9 files changed

+40
-77
lines changed

9 files changed

+40
-77
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@ composer.lock export-ignore
4343
.editorconfig export-ignore
4444
.env.example export-ignore
4545
LICENSE export-ignore
46+
/.phpunit.cache/ export-ignore

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
.env
22
/vendor/
33
composer.lock
4-
4+
.phpunit.cache/

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@
5555
"post-root-package-install": [
5656
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
5757
],
58-
"test:unit": "pest --colors=always --parallel",
59-
"test:types": "phpstan analyse --ansi",
60-
"test": [
61-
"@test:unit",
62-
"@test:types"
58+
"unit": "phpunit",
59+
"types": "phpstan analyse --ansi",
60+
"tests": [
61+
"@unit",
62+
"@types"
6363
]
6464
},
6565
"minimum-stability": "dev",

phpunit.xml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,23 @@
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
44
bootstrap="vendor/autoload.php"
5-
colors="true"
6-
>
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" colors="true">
714
<testsuites>
8-
<testsuite name="Test Suite">
9-
<directory suffix="Test.php">./tests</directory>
15+
<testsuite name="default">
16+
<directory>tests</directory>
1017
</testsuite>
1118
</testsuites>
12-
<source>
19+
20+
<source ignoreIndirectDeprecations="true" restrictNotices="true" restrictWarnings="true">
1321
<include>
14-
<directory>app</directory>
1522
<directory>src</directory>
1623
</include>
1724
</source>

tests/Feature/ExampleTest.php

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/Pest.php

Lines changed: 0 additions & 45 deletions
This file was deleted.

tests/SupabaseTest.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
declare(strict_types=1);
3+
namespace Tests;
4+
5+
use PHPUnit\Framework\Attributes\CoversClass;
6+
use PHPUnit\Framework\Attributes\Test;
7+
use PHPUnit\Framework\TestCase;
8+
use Supabase\Client\Functions as Supabase;
9+
10+
#[CoversClass(Functions::class)]
11+
class SupabaseTest extends TestCase
12+
{
13+
#[Test]
14+
public function connected()
15+
{
16+
$client = new Supabase('https://uafnqazxrhgsrnxxazkg.supabase.co', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InVhZm5xYXp4cmhnc3JueHhhemtnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDAwOTM4MDQsImV4cCI6MjA1NTY2OTgwNH0.2FMd5u8-K7R6gSUFAp3SDzt766hGGHTVGRkdyNwGLAM');
17+
$this->assertInstanceOf(Supabase::class, $client);
18+
// $this->assertTrue($client->getAllData('Users'));
19+
}
20+
}

tests/TestCase.php

Lines changed: 0 additions & 10 deletions
This file was deleted.

tests/Unit/ExampleTest.php

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)