Use DocumentsMatchConstraint for TestCase::assertMatchesDocument

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Tests
    • None
    • None
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      PHPLIB-410 introduced a MongoDB\Tests\SpecTests\DocumentsMatchConstraint class, which is used by the spec test runners. This should be suitable for the assertMatchesDocument() method in our base test class, MongoDB\Tests\TestCase.

      When implementing this, note the TODO itsems in DocumentsMatchConstraint regarding sortKeys and optimizing document comparisons by comparing extended JSON strings.

              Assignee:
              Unassigned
              Reporter:
              Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: