Adding new passing tests.
[phpeclipse.git] / net.sourceforge.phpeclipse.xdebug.test / src / net / sourceforge / phpeclipse / xdebug / php / launching / PHPSourceLookupParticipantTest.java
index 0b325c3..ad46b6f 100644 (file)
@@ -1,5 +1,8 @@
 package net.sourceforge.phpeclipse.xdebug.php.launching;
 
+import net.sourceforge.phpeclipse.xdebug.php.model.XDebugStackFrame;
+import net.sourceforge.phpeclipse.xdebug.php.model.XDebugThread;
+
 import org.eclipse.core.runtime.CoreException;
 
 import junit.framework.TestCase;
@@ -17,5 +20,22 @@ public class PHPSourceLookupParticipantTest extends TestCase {
                Object[] findSourceElements = psp.findSourceElements(null);
                assertTrue("array should be empty",findSourceElements.length == 0);
        }
-
+       public void testFindSourceElementsObject_WithXdebugStackFrame() throws CoreException {
+               PHPSourceLookupParticipant psp = new PHPSourceLookupParticipant();
+               XDebugStackFrame frame = new MockXDebugStackFrame();
+               Object[] findSourceElements = psp.findSourceElements(frame);
+               assertTrue("array should be empty",findSourceElements.length == 0);
+       }
+       
+       class MockXDebugStackFrame extends XDebugStackFrame {
+               public MockXDebugStackFrame() {
+                       super(null, 0);
+               }
+       }
+       
+       public void testGetSourceName() throws CoreException {
+               PHPSourceLookupParticipant psp = new PHPSourceLookupParticipant();
+               psp.getSourceName(null);
+       }
 }
+