1 /* 2 SPDX-FileCopyrightText: 2008 Niko Sams <niko.sams@gmail.com> 3 4 SPDX-License-Identifier: LGPL-2.0-only 5 */ 6 7 #ifndef TESTCOMPLETION_H 8 #define TESTCOMPLETION_H 9 10 #include <language/codecompletion/codecompletionitem.h> 11 #include <language/duchain/classdeclaration.h> 12 13 #include "../../duchain/tests/duchaintestbase.h" 14 15 namespace Php 16 { 17 18 class TestCompletion : public DUChainTestBase 19 { 20 Q_OBJECT 21 22 public: 23 TestCompletion(); 24 25 private: 26 void dumpCompletionItems(QList<KDevelop::CompletionTreeItemPointer> items); 27 void verifyExtendsOrImplements(const QString &code, const QString &actionStr, 28 KDevelop::ClassDeclarationData::ClassType, 29 const KDevelop::CursorInRevision& cursor, 30 QStringList forbiddenIdentifiers); 31 32 private slots: 33 void publicObjectCompletion(); 34 void publicStaticObjectCompletion(); 35 void protectedObjectCompletion(); 36 void protectedStaticObjectCompletion(); 37 void privateObjectCompletion(); 38 void privateStaticObjectCompletion(); 39 void methodCall(); 40 void functionCall(); 41 void nestedFunctionCall_data(); 42 void nestedFunctionCall(); 43 void newObjectFromOtherFile(); 44 void constantFromOtherFile(); 45 void baseClass(); 46 void extendsFromOtherFile(); 47 void globalClassFromOtherFile(); 48 void codeModel(); 49 void projectFileClass(); 50 void variable(); 51 void nameNormalVariable(); 52 void nameClassMember(); 53 void exceptions(); 54 void exceptionOtherFile(); 55 void abstractMethods(); 56 void interfaceMethods(); 57 void interfaceMethods2(); 58 void overrideMethods(); 59 void overrideVars(); 60 void implementMethods(); 61 void inArray(); 62 void newExtends(); 63 void updateExtends(); 64 void newImplements(); 65 void updateImplements(); 66 void avoidCircularInheritance(); 67 void unsureType(); 68 void completionAfterComments(); 69 void completionInComments(); 70 void phpStartTag(); 71 void outsidePhpContext(); 72 void nonGlobalInFunction(); 73 void fileCompletion(); 74 void instanceof(); 75 void afterFunctionArg(); 76 void functionBeforeDeclaration(); 77 void classBeforeDeclaration(); 78 void constantBeforeDeclaration(); 79 void variableBeforeDeclaration(); 80 void functionArguments(); 81 void referencedClass(); 82 void ctorCall(); 83 void chainedCalling(); 84 void funcCallInConditional(); 85 void namespaces(); 86 void inNamespace(); 87 void closures(); 88 }; 89 90 } 91 92 #endif // TESTCOMPLETION_H 93