Git Product home page Git Product logo

Comments (6)

DonCallisto avatar DonCallisto commented on August 19, 2024

Show us some code please.
I've never tested it with PHPUnit. Maybe @francoispluchino can help you.

from fastest.

kirkbushell avatar kirkbushell commented on August 19, 2024

So what we've done is configure database.php for laravel, and calling for the test channel from fastest:

'testing' => [
            'driver'    => env('TESTING_DB_DRIVER', 'mysql'),
            'host'      => env('TESTING_DB_HOST', 'localhost'),
            'database'  => env('TESTING_DB_DATABASE', 'af_testing').'_'.env('ENV_TEST_CHANNEL'),
            'username'  => env('TESTING_DB_USERNAME', 'af_testing'),
            'password'  => env('TESTING_DB_PASSWORD', ''),
            'charset'   => 'utf8',
            'collation' => 'utf8_unicode_ci',
            'prefix'    => str_random(8).'_',
            'strict'    => false,
        ],

This would theoretically allow us to setup 4 or more databases that the tests could be run on. Unfortunately, the ENV_TEST_CHANNEL is never available.

from fastest.

DonCallisto avatar DonCallisto commented on August 19, 2024

env is not modified anyhow AFAIK.
Have you tried with https://github.com/liuggio/fastest/blob/3e2b96d2d681b8d54e8d1309d03f1299aa2f19de/README.md#sqlite-databases

Don't know if this solve.

from fastest.

kirkbushell avatar kirkbushell commented on August 19, 2024

The docs state that there are various env vars injected for use - including the test channel.

We can't use sqlite databases, for a variety of reasons.

from fastest.

DonCallisto avatar DonCallisto commented on August 19, 2024

You're right, I was just focusing on __DATABASE__ placeholder.
BTW in my projects all works. Just wondering if env instead of getenv (I don't use laravel but AFAIK is should only be a kind "of wrapper") is messing things around.
Have you tried to dump the env variables? Moreover, could you replicate it in a open repo in order to let me try tackle this?
I've tried locally but it works :\

from fastest.

kirkbushell avatar kirkbushell commented on August 19, 2024

@DonCallisto getenv seems to work, so I think there may be a bug with the env() wrapper in that library. So I'm able to get the various processes now but seeing some weirdness with our setup which I'm trying to work out. In any case, I'd consider this issue closed. Thanks :)

from fastest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.