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

Configuration example #37

Closed
stefgosselin opened this issue Jul 24, 2020 · 2 comments
Closed

Configuration example #37

stefgosselin opened this issue Jul 24, 2020 · 2 comments

Comments

@stefgosselin
Copy link

stefgosselin commented Jul 24, 2020

Hi Dustin,

I am very much interested in giving your package a try-out, the application I maintain has a very large test-suite that it seems would benefit greatly from this approach.

I am hoping if you would kindly consider adding an example of configuration for the databases ( .env, .env.testing, phpunit.xml)

, I am not able to get the test database to work, and it is unclear if this DB needs to be migrated when tests are exectuded the first time. I have created the database "projectName_test" but my tests cannot connect to it, I tried all combinations it seems.

Thanks

@jonathanpmartins
Copy link

jonathanpmartins commented Sep 11, 2020

@drfraker
I think I run into a similar problem. Looking into the code I see that the package only looks for the default connection inside database.php config file. The database settings should be customizable. Would be nice to have these configurations inside the snipe.php config file. This way I can create my own environment entries, and set up it all there.

@addgod
Copy link
Collaborator

addgod commented Jun 8, 2021

@jonathanpmartins

Just set that up your database connection in phpunit.xml.

<php>
    <env name="APP_ENV" value="testing"/>
    <env name="BCRYPT_ROUNDS" value="4"/>
    <env name="CACHE_DRIVER" value="array"/>
    <env name="DB_DATABASE" value="testing"/>
    <env name="MAIL_DRIVER" value="array"/>
    <env name="QUEUE_CONNECTION" value="sync"/>
    <env name="SESSION_DRIVER" value="array"/>
    <env name="TELESCOPE_ENABLED" value="false"/>
    <env name="SCOUT_DRIVER" value="null"/>
</php>

Here is an example of working env settings.

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

No branches or pull requests

4 participants