/**
* Tests the {@link PhpXref} class.
* @author Gustavo Lopes
*/
public class PhpXrefTest {
+ "/" + name);
return new FileInputStream(f);
}
/**
* Xref output test for a sample string.
* @throws IOException
*/
@SuppressWarnings("static-method")
@Test
String s = "<?php foo bar";
StringWriter w = new StringWriter();
assertEquals("<div id='lines'\n><div><strong><"
+ "?php</strong> <a href=\"/source/s?defs=foo\">foo</a> "
+ "<a href=\"/source/s?defs=bar\">bar</a></div\n></div\n>",
w.toString());
}
/**
* Xref output test for {@code sample.php}.
* @throws IOException
*/
@SuppressWarnings("static-method")
@Test
// produce
Writer w = new StringWriter();
// get expected
String s;
}
// compare
}
}
}