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

Update bootstrap.php so the tests can run on both HHVM and Zend #143

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@JoelMarcey
Contributor

JoelMarcey commented Aug 28, 2013

PDOStatement does not have a direct constructor (i.e., __construct). Newing up a PDOStatement or subclass (e.g., MockPDOStatement) does technically work in Zend, but HHVM throws. A correct way to have the code currently structured in bootstrap.php work correctly on both Zend and HHVM is provide a default constructor and execute method in MockPDOStatement. It would probably best long term to avoid newing up a PDOStatement and create the queries another way. But this works for now.

Update bootstrap.php so the tests can run on both HHVM and Zend
PDOStatement does not have a direct constructor (i.e., __construct). Newing up a PDOStatement or subclass (e.g., MockPDOStatement) does technically work in Zend, but HHVM throws. A correct way to have the code currently structured in bootstrap.php work correctly on both Zend and HHVM is provide a default constructor and execute method in MockPDOStatement. It would probably best long term to avoid newing up a PDOStatement and create the queries another way. But this works for now.
@treffynnon

This comment has been minimized.

Show comment
Hide comment
@treffynnon

treffynnon Aug 28, 2013

Collaborator

Merged in commit 4e9f892

Collaborator

treffynnon commented Aug 28, 2013

Merged in commit 4e9f892

@treffynnon treffynnon closed this Aug 28, 2013

dmitrymomot pushed a commit to dmitrymomot/paris that referenced this pull request Apr 21, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment