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

[test infrastructure] TextEditTest fails due to lack of AssertionError if assertions are off #254

Closed
TysonAndre opened this issue Jul 28, 2018 · 1 comment

Comments

@TysonAndre
Copy link
Contributor

Steps to reproduce: set zend.assertions = -1 in the PHP ini, run TextEditTest in phpunit.

See http://php.net/manual/en/function.assert.php#function.assert.expectations

Solutions:

  • Change the code to throw OutOfBoundsException (or have an explicit throw statement for AssertionError) instead of using assert() so that the behavior of TextEdit::applyEdits is always consistent. If TextEdit::applyEdits is a public API (is it? I don't see it used anywhere), this may make sense to do.
  • Skip the test based on the value of zend.assertions.
@TysonAndre
Copy link
Contributor Author

Duplicate of #161 , missed that the first time I looked due to searching for AssertionError

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

1 participant