Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding tests structure with some basic tests #15

Merged
merged 4 commits into from
Jul 17, 2024

Conversation

ineersa
Copy link
Contributor

@ineersa ineersa commented Jul 17, 2024

Added orchestra/testbench to test package.
Added composer commands:

"post-autoload-dump": [
            "@clear",
            "@prepare"
        ],
        "clear": "@php vendor/bin/testbench package:purge-skeleton --ansi",
        "prepare": "@php vendor/bin/testbench package:discover --ansi",
        "build": "@php vendor/bin/testbench workbench:build --ansi",
        "serve": [
            "Composer\\Config::disableProcessTimeout",
            "@build",
            "@php vendor/bin/testbench serve"
        ],
        "lint": [
            "@php vendor/bin/pint",
            "@php vendor/bin/phpstan analyse"
        ],
        "phpstan-baseline": [
            "@php vendor/bin/phpstan -b"
        ],
        "test": [
            "@php vendor/bin/phpunit"
        ],
        "test-feature": [
            "@php vendor/bin/phpunit --testsuite=Feature"
        ],
        "test-unit": [
            "@php vendor/bin/phpunit --testsuite=Unit"
        ]

Added some basic tests:

  • \Turso\Driver\Laravel\Tests\Feature\ConnectionsSetupTest - tests how connection configuration setup is working
  • \Turso\Driver\Laravel\Tests\Feature\CreateRecordsTest - tests new record creation

To run single test you can use ./vendor/bin/phpunit --filter=CreateRecordsTest::testCreateViaEloquent

I've decided not to put errors into phpstan baseline, si8nce some of them should be fixed.

@darkterminal darkterminal merged commit 6c7ee8f into tursodatabase:main Jul 17, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants