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

Overwriting of PHPUnit TestCase properties #26

Closed
cHeeSaW opened this issue Aug 8, 2019 · 1 comment
Closed

Overwriting of PHPUnit TestCase properties #26

cHeeSaW opened this issue Aug 8, 2019 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@cHeeSaW
Copy link

cHeeSaW commented Aug 8, 2019

Describe the bug
When the tested class has parameters in the constructor which are named like properties of the PHPUnit TestCase class, these would be overwritten after using quickmock

To Reproduce
Steps to reproduce the behavior:

  1. Create a class with a contructor parameter called data
  2. Create a test for this class
  3. Use quickmock
  4. See error

Expected behavior
Maybe detection if TestCase already reservers a name and rename the generated property

@cawolf cawolf closed this as completed in a9ee0ad Aug 13, 2019
cawolf added a commit that referenced this issue Aug 13, 2019
@cawolf
Copy link
Owner

cawolf commented Aug 13, 2019

Whenever mock names collide with existing inherited properties, a suffix will now be added to the name to distinguish them.

@cawolf cawolf added this to the v1.3.1 milestone Dec 30, 2019
@cawolf cawolf added the bug Something isn't working label Dec 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants