diff --git a/src/com/digitalsandwich/phake/PhakeMockTypeProvider.java b/src/com/digitalsandwich/phake/PhakeMockTypeProvider.java index f77211a..adbf148 100644 --- a/src/com/digitalsandwich/phake/PhakeMockTypeProvider.java +++ b/src/com/digitalsandwich/phake/PhakeMockTypeProvider.java @@ -118,16 +118,20 @@ public Collection getBySignature(String s, Project pr Collection signedClasses = new ArrayList(); if (s.substring(0, 4).equals(CALLTYPE_MOCK)) { + signedClasses.add(phpIndex.getClassByName("Phake_IMock")); int separator = s.indexOf("~"); - String phakeSignature = s.substring(4, separator); String className = s.substring(separator + 1); PhpClass phpClass = phpIndex.getClassByName(className); - signedClasses.addAll(phpIndex.getBySignature(phakeSignature)); + Collection fqnClasses = phpIndex.getClassesByFQN(className); if (phpClass != null) { signedClasses.add(phpClass); } + else if (fqnClasses.size() > 0) + { + signedClasses.addAll(fqnClasses); + } else { signedClasses.addAll(phpIndex.getInterfacesByName(className));