-
Notifications
You must be signed in to change notification settings - Fork 208
PHPC-314: Added a few tests that don't touch the server #812
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
Conversation
tests/bson/bson-toPHP-008.phpt
Outdated
--FILE-- | ||
<?php | ||
|
||
require_once __DIR__ . "/../utils/basic.inc"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
basic.inc
requires PHONGO-SERVERS.json
. You should be use require_once __DIR__ . '/../utils/tools.php';
for a non-server test.
Note: this wasn't a problem in bson-toPHP-007.phpt
from your earlier PR, as you didn't include anything there. That said, I don't think anything in this test actually needs a helper function in tools.php
, since you're calling the BSON functions by their full namespace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it seems I missed to change these lines.
tests/bson/bson-toPHP-008.phpt
Outdated
] ); | ||
|
||
function fetch($bson, $typeMap = []) { | ||
return [ \MongoDB\BSON\toPHP($bson, $typeMap) ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason for this to return an array if all of the tests have to access the first element before asserting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had left it so that the assertions were the same as the tests where these were copied from. I'll change them.
Travis failures are likely due to #813. Please rebase. |
3f30d7e
to
af325a2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated with your review comments.
tests/bson/bson-toPHP-008.phpt
Outdated
--FILE-- | ||
<?php | ||
|
||
require_once __DIR__ . "/../utils/basic.inc"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it seems I missed to change these lines.
tests/bson/bson-toPHP-008.phpt
Outdated
] ); | ||
|
||
function fetch($bson, $typeMap = []) { | ||
return [ \MongoDB\BSON\toPHP($bson, $typeMap) ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had left it so that the assertions were the same as the tests where these were copied from. I'll change them.
af325a2
to
032f08f
Compare
No description provided.