-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Conversation
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" /> |
There was a problem hiding this comment.
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 😢
There was a problem hiding this comment.
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 👍
@javiereguiluz I added a few comments explaining the usage of this bundle. Should I also comment the listener inside |
bf23ef1
to
e90ba4f
Compare
* | ||
* 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PRPUnit
? 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
There was a problem hiding this 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!
@javiereguiluz changes look good to me 👍 |
@dmaicher I'm sorry but when merging other PR, a conflict was created in your composer.lock file. Could you please rebase it? Thanks! |
Sure will do it tonight 😉 |
f693779
to
3a94540
Compare
@javiereguiluz done 😉 |
@dmaicher thanks! I've merged this to test it for real in the application and see how it goes :) |
…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
👍 |
This fixes #445 by using https://github.com/dmaicher/doctrine-test-bundle to have proper test isolation.