Thanks to visit codestin.com
Credit goes to github.com

Skip to content

remove useless tests that fail in php 7 #14088

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

Merged
merged 1 commit into from
Mar 29, 2015
Merged

Conversation

Tobion
Copy link
Contributor

@Tobion Tobion commented Mar 27, 2015

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #14086 for Security and Form component
License MIT
Doc PR -

@expectedException \PHPUnit_Framework_Error doesn't catch php fatal errors for wrong types in php 7. But these test are also pretty useless anyway. Then we would have to add a lot of tests for all arguments that are typehinted. Let's just remove these tests.

@@ -67,16 +67,6 @@ protected function tearDown()
}

/**
* @expectedException \PHPUnit_Framework_Error
*/
public function testChoicesOptionExpectsArray()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test will be totally different in 2.7 anyway with the changes to Choice type.

@aitboudad
Copy link
Contributor

why not skip these tests in PHP7 instead ?

@Tobion
Copy link
Contributor Author

Tobion commented Mar 28, 2015

why keep them?

@sstok
Copy link
Contributor

sstok commented Mar 29, 2015

👍

@fabpot
Copy link
Member

fabpot commented Mar 29, 2015

Thank you @Tobion.

@fabpot fabpot merged commit 59cab27 into symfony:2.3 Mar 29, 2015
fabpot added a commit that referenced this pull request Mar 29, 2015
This PR was merged into the 2.3 branch.

Discussion
----------

remove useless tests that fail in php 7

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #14086 for Security and Form component
| License       | MIT
| Doc PR        | -

`@expectedException \PHPUnit_Framework_Error` doesn't catch php fatal errors for wrong types in php 7. But these test are also pretty useless anyway. Then we would have to add a lot of tests for all arguments that are typehinted. Let's just remove these tests.

Commits
-------

59cab27 remove useless tests that fail in php 7
@Tobion Tobion deleted the security-php-7 branch March 29, 2015 14:17
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.

4 participants