private function getClassName(string $filename, array $previousDeclaredClasses)
    {
        $filename = realpath($filename);
        $classes = get_declared_classes();
        $newClasses = array_values(array_diff($classes, $previousDeclaredClasses));

        $className = $this->_searchForUnitTestClass($newClasses, $filename);
        if (isset($className)) {
            return $className;
        }

        $className = $this->_searchForUnitTestClass($classes, $filename);
        if (isset($className)) {
            return $className;
        }
    }