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

Inaccuracies in cookbook entry "How to test Doctrine Repositories" #901

Closed
keymaster opened this issue Dec 7, 2011 · 6 comments
Closed

Comments

@keymaster
Copy link

The reader is told to inherit from OrmTestCase at the following path:

use Doctrine\Tests\OrmTestCase;

However, there is no such class in the standard Symfony distribution (2.05).

Is there perhaps some additional doctrine bundle which needs to be installed - if so, it should be mentioned?

Also, the entry should probably also describe how to do this with xml metadata, not just annotations.

@stof
Copy link
Member

stof commented Dec 7, 2011

@fabpot the issue here is that the Doctrine tests are not included in the tarball including vendors

@beberlei should the base class be in the actual Doctrine code to make it easier to use it ? the test namespace of the vendors generally does not have an autoloader registered (and it would avoid such issue when getting rid of vendor tests)

@beberlei
Copy link
Contributor

beberlei commented Dec 7, 2011

Doctrine\Tests\OrmTestCase is not part of the code we distribute to our users. Its part of the tests, no BC guarantee or whatsoever. So i wouldnt advise to use this at all.

@stof
Copy link
Member

stof commented Dec 7, 2011

Ok, then the Symfony doc should be changed.

@weaverryan
Copy link
Member

So what do you think is better, showing the example with a big warning or removing entirely? Personally, I think that repo testing should be all "functional" and not unit.

@stof
Copy link
Member

stof commented Dec 7, 2011

I would vote for removing it

weaverryan added a commit that referenced this issue Apr 29, 2012
…is *is* possible, but the things we're doing here aren't guaranteed to be backwards-compatible. Therefore, it's not responsible to encourage users to try this.

See #901
@weaverryan
Copy link
Member

I've removed the section about unit testing the repository as I agree that we shouldn't recommend doing something that's not guaranteed for BC.

Thanks!

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