Skip to content

Strategies to test an application using Laravel-MongoDB #23

Closed
@thylo

Description

@thylo

Hi,

Thanks for your module, it look very promising.
I'm pretty new to the testing world so I was just wondering how you would do integration tests on an application using your module.

Laravel tools like migration and seeding are not quite relevant with MongoDB.

What I would do is to set up a test db, flush it before each test, and then use something like https://github.com/Zizaco/factory-muff to populate my test db with some fake models.

What is your strategy on that matter ?

Activity

jenssegers

jenssegers commented on Aug 21, 2013

@jenssegers
Contributor

I'm definitely not an expert in unit testing, there is still a lot I can learn myself.

Writings tests for an application using this database driver should not be different from tests using the original drivers.

The original Laravel tests use Mockery, so be sure to check that out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @jenssegers@thylo

        Issue actions

          Strategies to test an application using Laravel-MongoDB · Issue #23 · mongodb/laravel-mongodb