KevDev
1 week ago

Laravel 7 using codeception with .env.testing

Posted 1 week ago by KevDev

Hey guys. I am really new on codeception and I setup laravel5 module on my laravel7 application and it works but I am facing a problem when I load a .env.testing on unit.suite.yml and codeception.yml.. i am pretty sure this is just a configuration issue that I have not done correctly. Please see my configuration below that is working but its talking to my main database.

codeception.yml please see below

// unit.suite.yml
actor: UnitTester
modules:
    enabled:
        - Asserts
        - \Helper\Unit
        - Laravel5:
            environment_file: .env.testing
//codeception.yml
paths:
    tests: tests
    output: tests/_output
    data: tests/_data
    support: tests/_support
    envs: tests/_envs
actor_suffix: Tester
extensions:
    enabled:
        - Codeception\Extension\RunFailed
modules:
    enabled:
        - Laravel5
            environment_file: .env.testing

Screenshot_3

I hope someone can help here because I stuck in here for few days and continue my developing using the db i set on .env luckily i am far from being done so no real data yet. TIA

Please sign in or create an account to participate in this conversation.