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;
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);
+ }
}
+
--- /dev/null
+package net.sourceforge.phpeclipse.xdebug.php.model;
+
+import junit.framework.TestCase;
+
+public class XDebugElementTest extends TestCase {
+
+ public void testXDebugElement_XDebugTarget() {
+ new XDebugElement(null);
+ }
+
+ public void testXDebugElement() {
+ new XDebugElement();
+ }
+
+}
--- /dev/null
+package net.sourceforge.phpeclipse.xdebug.php.model;
+
+import junit.framework.TestCase;
+
+public class XDebugStackFrameTest extends TestCase {
+
+ public void testXDebugStackFrame_Constructor_Should_NOt_Fail_With_NPE() {
+ new XDebugStackFrame(null,0);
+ }
+
+ public void testXDebugStackFrame_GetSourceName() {
+ XDebugStackFrame frame = new XDebugStackFrame(null,0);
+ frame.getSourceName();
+ }
+
+}