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

php 5.3 compatibility #21

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

kanellov
Copy link

Hello,

in your README.md file you mention that "FUnit is a testing microframework for PHP 5.3+...". After using it to test my projects, i noticed that the methods throws and all_ok fail when using php 5.3 throwing the following error:

CATCHABLE FATAL ERROR: Argument 2 passed to FUnit::assert_all_ok() must be an instance of callable, instance of Closure given, called in <<test file>> on line 58 and defined in ...

These two methods use the php type hint callable, which is available in php >= 5.4 (Callbacks / Callables).

Also, the unit tests do not work in php 5.3 because of the array dereference, also supported by php >= 5.4.

I' ve enabled the FUnit's methods throws and all_ok to accept any callables and also updated the unit tests in order to work with php 5.3.

Tell me what you think about it !

@kanellov kanellov changed the title Php53compatible php 5.3 compatibility Mar 11, 2015
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.

1 participant