Skip to content

PHPLIB-502: Assert against transaction state #710

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
Jan 27, 2020

Conversation

alcaeus
Copy link
Member

@alcaeus alcaeus commented Jan 24, 2020

https://jira.mongodb.org/browse/PHPLIB-502

This makes use of the new getTransactionState accessor introduced in mongodb/mongo-php-driver#1061 to assert against the transaction state in spec tests.

@alcaeus alcaeus requested a review from jmikola January 24, 2020 12:00
@alcaeus alcaeus self-assigned this Jan 24, 2020
@@ -568,8 +568,7 @@ private function executeForTestRunner(FunctionalTestCase $test, Context $context
* instead exposes a bool to let us know whether a transaction
* is currently in progress. This code may fail down the line
* and should be adjusted once PHPC-1438 is implemented. */
$expected = in_array($this->arguments['state'], ['in_progress', 'starting']);
$test->assertSame($expected, $args['session']->isInTransaction());
$test->assertSame($this->arguments['state'], $args['session']->getTransactionState());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realized this isn't documented. Added a label on PHPC-1438.

alcaeus added a commit that referenced this pull request Jan 27, 2020
@alcaeus alcaeus merged commit dc1b43d into mongodb:master Jan 27, 2020
@alcaeus alcaeus deleted the phplib-502 branch February 15, 2021 13:07
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