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; public class PHPSourceLookupParticipantTest extends TestCase { public void testFindSourceElementsObject() throws CoreException { PHPSourceLookupParticipant psp = new PHPSourceLookupParticipant(); Object[] findSourceElements = psp.findSourceElements(new Object()); assertTrue("array should be empty",findSourceElements.length == 0); } public void testFindSourceElementsObject_WithNull() throws CoreException { PHPSourceLookupParticipant psp = new PHPSourceLookupParticipant(); 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); } }