Skip to content

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

Merged
merged 1 commit into from
Apr 25, 2018

Conversation

derickr
Copy link
Contributor

@derickr derickr commented Apr 18, 2018

No description provided.

--FILE--
<?php

require_once __DIR__ . "/../utils/basic.inc";
Copy link
Member

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.

Copy link
Contributor Author

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.

] );

function fetch($bson, $typeMap = []) {
return [ \MongoDB\BSON\toPHP($bson, $typeMap) ];
Copy link
Member

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?

Copy link
Contributor Author

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.

@jmikola
Copy link
Member

jmikola commented Apr 23, 2018

Travis failures are likely due to #813. Please rebase.

@derickr derickr force-pushed the PHPC-314-extra-tests branch from 3f30d7e to af325a2 Compare April 24, 2018 13:49
Copy link
Contributor Author

@derickr derickr left a 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.

--FILE--
<?php

require_once __DIR__ . "/../utils/basic.inc";
Copy link
Contributor Author

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.

] );

function fetch($bson, $typeMap = []) {
return [ \MongoDB\BSON\toPHP($bson, $typeMap) ];
Copy link
Contributor Author

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.

@derickr derickr force-pushed the PHPC-314-extra-tests branch from af325a2 to 032f08f Compare April 25, 2018 10:58
@derickr derickr merged commit 032f08f into mongodb:master Apr 25, 2018
derickr added a commit that referenced this pull request Apr 25, 2018
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.

2 participants