private function setOrder($tests_dependencies, $tests_methods)
    {
        $new_order = [];
        foreach ($tests_methods as $method_name => $order) {
            if (isset($tests_dependencies[$method_name]) && !in_array($tests_dependencies[$method_name], $new_order)) {
                $new_order[] = $tests_dependencies[$method_name];
                $this->isDependant($new_order, $tests_dependencies, $tests_methods, $tests_dependencies[$method_name]);
            }

            if (!in_array($method_name, $new_order)) {
                $new_order[] = $method_name;
            }
        }

        return $new_order;
    }