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

Add tests for existing extensions #12

Closed
wants to merge 4 commits into from

Conversation

vhenzl
Copy link
Contributor

@vhenzl vhenzl commented Sep 24, 2017

Unit tests for DoctrineSelectableClassReflectionExtension, DoctrineSelectableDynamicReturnTypeExtension and EntityManagerFindDynamicReturnTypeExtension.

@ondrejmirtes
Copy link
Member

Thanks a lot, I really appreciate this! I merged this into master with some changes:

  1. I had to update some tests because getReference/find/etc. now return mixed by default. It means that anything can be called on it and that PHPStan does not report "Cannot call method X() on object."
  2. I like asserting type descriptions (strings) rather than asserting instances of Type objects. I consider them an implementation detail, but string type descriptions are considered public-facing.
  3. I added a commit that integrates the new phpstan-phpunit extension which correctly handles mocks: 6ad0f3d

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

Successfully merging this pull request may close these issues.

2 participants