Uploaded image for project: 'PHP Driver: Library'
  1. PHP Driver: Library
  2. PHPLIB-693

Remove early returns for failed tests from tearDown methods

      Various tearDown() methods in the test suite start with:

      if ($this->hasFailed()) {
          return;
      }
      

      They go on to clean up the test resources (e.g. drop collections) and then call the parent tearDown() method.

      This presumes that the parent method intends to also do nothing if the test has failed, which may not always be the case (e.g. disabling fail points is always helpful).

      Rather than return early, these functions should just gate their own logic and always delegate to the parent afterwards.

            Assignee:
            jerome.tamarelle@mongodb.com Jérôme Tamarelle
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: