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

ensure compatibility with older PHPUnit mocks #29934

Merged
merged 1 commit into from Jan 25, 2019

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Jan 19, 2019

Q A
Branch? 3.4
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR

@xabbuh xabbuh added this to the 3.4 milestone Jan 19, 2019

$this->assertEquals(['a1' => $ac1], $classMetadata2->getAttributesMetadata());
$this->assertSame(['a', 'b', 'c'], $ac1->getGroups());
$this->assertEquals(['a1' => $ac1], $classMetadata1->getAttributesMetadata());
Copy link
Member Author

Choose a reason for hiding this comment

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

@dunglas Can you have a look here? Reading the code the previous assertion on $classMetadata2 IMO was wrong and only accidentally worked because of our mock configuration line 62. Can you confirm that the change here is valid?

@xabbuh xabbuh force-pushed the phpunit-mock-compat branch 7 times, most recently from a309317 to 8780184 Compare January 24, 2019 08:13
/**
* @dataProvider methodExceptGetProvider
*/
public function testSubmitFileWithNamelessForm($method)
Copy link
Member Author

Choose a reason for hiding this comment

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

This test was completely broken and just worked because our mocked form behaved completely different from how a real form would behave. I am looking into a proper fix in a different PR.

@xabbuh xabbuh force-pushed the phpunit-mock-compat branch 2 times, most recently from e2de9f6 to 73369e7 Compare January 24, 2019 17:33
@xabbuh xabbuh force-pushed the phpunit-mock-compat branch 2 times, most recently from 51dfa67 to 0b2546f Compare January 25, 2019 08:55
@xabbuh xabbuh changed the title [WIP] ensure compatibility with older PHPUnit mocks ensure compatibility with older PHPUnit mocks Jan 25, 2019
@nicolas-grekas
Copy link
Member

Thank you @xabbuh.

@nicolas-grekas nicolas-grekas merged commit 0d9de7e into symfony:3.4 Jan 25, 2019
nicolas-grekas added a commit that referenced this pull request Jan 25, 2019
This PR was merged into the 3.4 branch.

Discussion
----------

ensure compatibility with older PHPUnit mocks

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

0d9de7e [Form] ensure compatibility with older PHPUnit mocks
@xabbuh xabbuh deleted the phpunit-mock-compat branch January 25, 2019 09:41
fabpot added a commit that referenced this pull request Feb 12, 2019
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] add back test after fixing it

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #29934 (comment)
| License       | MIT
| Doc PR        |

Commits
-------

0daeba8 add back test after fixing it
symfony-splitter pushed a commit to symfony/form that referenced this pull request Feb 12, 2019
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] add back test after fixing it

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | symfony/symfony#29934 (comment)
| License       | MIT
| Doc PR        |

Commits
-------

0daeba8e8a add back test after fixing it
sandergo90 pushed a commit to sandergo90/symfony that referenced this pull request Jul 4, 2019
…bbuh)

This PR was merged into the 3.4 branch.

Discussion
----------

ensure compatibility with older PHPUnit mocks

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

0d9de7e [Form] ensure compatibility with older PHPUnit mocks
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.

None yet

3 participants