1 package net.sourceforge.phpeclipse.xdebug.php.launching;
3 import net.sourceforge.phpeclipse.xdebug.php.model.XDebugStackFrame;
4 import net.sourceforge.phpeclipse.xdebug.php.model.XDebugThread;
6 import org.eclipse.core.runtime.CoreException;
8 import junit.framework.TestCase;
10 public class PHPSourceLookupParticipantTest extends TestCase {
12 public void testFindSourceElementsObject() throws CoreException {
13 PHPSourceLookupParticipant psp = new PHPSourceLookupParticipant();
14 Object[] findSourceElements = psp.findSourceElements(new Object());
15 assertTrue("array should be empty",findSourceElements.length == 0);
18 public void testFindSourceElementsObject_WithNull() throws CoreException {
19 PHPSourceLookupParticipant psp = new PHPSourceLookupParticipant();
20 Object[] findSourceElements = psp.findSourceElements(null);
21 assertTrue("array should be empty",findSourceElements.length == 0);
23 public void testFindSourceElementsObject_WithXdebugStackFrame() throws CoreException {
24 PHPSourceLookupParticipant psp = new PHPSourceLookupParticipant();
25 XDebugStackFrame frame = new MockXDebugStackFrame();
26 Object[] findSourceElements = psp.findSourceElements(frame);
27 assertTrue("array should be empty",findSourceElements.length == 0);
30 class MockXDebugStackFrame extends XDebugStackFrame {
31 public MockXDebugStackFrame() {
36 public void testGetSourceName() throws CoreException {
37 PHPSourceLookupParticipant psp = new PHPSourceLookupParticipant();
38 psp.getSourceName(null);