Peridot\Core\Test::runTearDown PHP Method

runTearDown() protected method

Run the tests tear down methods and have the result perform the method indicated by $action
protected runTearDown ( Peridot\Core\TestResult $result, array $action )
$result Peridot\Core\TestResult
$action array
    protected function runTearDown(TestResult $result, array $action)
    {
        $this->forEachNodeBottomUp(function (TestInterface $test) use($result, &$action) {
            $tearDowns = $test->getTearDownFunctions();
            foreach ($tearDowns as $tearDown) {
                try {
                    $tearDown();
                } catch (Throwable $e) {
                    $this->failIfPassing($action, $e);
                } catch (Exception $e) {
                    $this->failIfPassing($action, $e);
                }
            }
        });
        call_user_func_array([$result, $action[0]], array_slice($action, 1));
    }