File indexing completed on 2024-04-14 14:47:49

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 PHPUNITPROVIDER_H
0008 #define PHPUNITPROVIDER_H
0009 
0010 #include <interfaces/iplugin.h>
0011 
0012 #include <language/duchain/indexeddeclaration.h>
0013 #include <language/duchain/topducontext.h>
0014 
0015 #include <serialization/indexedstring.h>
0016 
0017 #include <QVariant>
0018 
0019 class QVariant;
0020 
0021 class PhpUnitProvider : public KDevelop::IPlugin
0022 {
0023     Q_OBJECT
0024 
0025 public:
0026     PhpUnitProvider(QObject* parent, const QList<QVariant>& args = QList<QVariant>());
0027 
0028 public slots:
0029     void updateReady(const KDevelop::IndexedString& document, const KDevelop::ReferencedTopDUContext& context);
0030 
0031 private:
0032     KDevelop::IndexedString m_phpUnitDeclarationsFile;
0033     KDevelop::IndexedDeclaration m_testCaseDeclaration;
0034     QList<KDevelop::ReferencedTopDUContext> m_pendingContexts;
0035 
0036     void processContext(KDevelop::ReferencedTopDUContext context);
0037     void processTestCaseDeclaration(KDevelop::Declaration* declaration);
0038 };
0039 
0040 #endif // PHPUNITPROVIDER_H