File indexing completed on 2024-04-21 15:24:20

0001 /*
0002     SPDX-FileCopyrightText: 2012 Miha Čančula <miha@noughmad.eu>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef PHPUNITTESTSUITE_H
0008 #define PHPUNITTESTSUITE_H
0009 
0010 #include <interfaces/itestsuite.h>
0011 #include <language/duchain/indexeddeclaration.h>
0012 
0013 #include <QUrl>
0014 #include <QHash>
0015 
0016 class KJob;
0017 namespace KDevelop {
0018 class IProject;
0019 }
0020 
0021 
0022 class PhpUnitTestSuite : public KDevelop::ITestSuite
0023 {
0024 
0025 public:
0026     PhpUnitTestSuite(const QString& name, const QUrl& url, const KDevelop::IndexedDeclaration& suiteDeclaration, const QStringList& cases, const QHash< QString, KDevelop::IndexedDeclaration >& caseDeclarations, KDevelop::IProject* project);
0027     ~PhpUnitTestSuite() override;
0028 
0029     KJob* launchCase(const QString& testCase, TestJobVerbosity verbosity) override;
0030     KJob* launchCases(const QStringList& testCases, TestJobVerbosity verbosity) override;
0031     KJob* launchAllCases(TestJobVerbosity verbosity) override;
0032 
0033     KDevelop::IProject* project() const override;
0034     QUrl url() const;
0035     QStringList cases() const override;
0036     QString name() const override;
0037 
0038     KDevelop::IndexedDeclaration declaration() const override;
0039     KDevelop::IndexedDeclaration caseDeclaration(const QString& testCase) const override;
0040 
0041 private:
0042     QString m_name;
0043     QUrl m_url;
0044     KDevelop::IndexedDeclaration m_declaration;
0045     QStringList m_cases;
0046     QHash<QString, KDevelop::IndexedDeclaration> m_caseDeclarations;
0047     KDevelop::IProject* m_project;
0048 };
0049 
0050 #endif // PHPUNITTESTSUITE_H