Skip to content

Use dama/doctrine-test-bundle for proper test DB isolation #459

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

Merged
merged 5 commits into from
Feb 17, 2017

Conversation

dmaicher
Copy link
Contributor

@dmaicher dmaicher commented Feb 11, 2017

This fixes #445 by using https://github.com/dmaicher/doctrine-test-bundle to have proper test isolation.

phpunit.xml.dist Outdated
@@ -28,4 +28,8 @@
</exclude>
</whitelist>
</filter>

<listeners>
<listener class="\DAMA\DoctrineTestBundle\PHPUnit\PHPUnitStaticDbConnectionListener" file="vendor/dama/doctrine-test-bundle/src/DAMA/DoctrineTestBundle/PHPUnit/PHPUnitStaticDbConnectionListener.php" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the file attribute required here? It looks a bit ugly 😢

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right 😊 It's not required 👍

@dmaicher
Copy link
Contributor Author

@javiereguiluz I added a few comments explaining the usage of this bundle. Should I also comment the listener inside phpunuit.xml.dist?

*
* Therefore in the following test case we can edit the Post with ID=1 although we deleted it in this test.
* This test changes the database contents by deleting a blog post. However,
* thanks to the DAMADoctrineTestBundle and its PRPUnit listener, all changes
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PRPUnit? 😄

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

Copy link
Member

@javiereguiluz javiereguiluz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


@dmaicher I've committed some changes directly into your PR. If you make further commits, please don't make a forced push. Thanks!

@dmaicher
Copy link
Contributor Author

@javiereguiluz changes look good to me 👍

@javiereguiluz
Copy link
Member

@dmaicher I'm sorry but when merging other PR, a conflict was created in your composer.lock file. Could you please rebase it? Thanks!

@dmaicher
Copy link
Contributor Author

Sure will do it tonight 😉

@dmaicher
Copy link
Contributor Author

@javiereguiluz done 😉

@javiereguiluz
Copy link
Member

@dmaicher thanks! I've merged this to test it for real in the application and see how it goes :)

@javiereguiluz javiereguiluz merged commit 3a94540 into symfony:master Feb 17, 2017
javiereguiluz added a commit that referenced this pull request Feb 17, 2017
…on (dmaicher, javiereguiluz)

This PR was merged into the master branch.

Discussion
----------

Use dama/doctrine-test-bundle for proper test DB isolation

This fixes #445 by using https://github.com/dmaicher/doctrine-test-bundle to have proper test isolation.

Commits
-------

3a94540 Fixed a typo
172ce3d Tweaks
0fa427c add some comments about the usage of the bundle
fc1b7c3 remove file path from listener config
d968017 Use dama/doctrine-test-bundle for proper test DB isolation
@dmaicher
Copy link
Contributor Author

👍

@dmaicher dmaicher deleted the db-test-isolation branch November 8, 2017 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve the functional tests
2 participants