basic word filter test
This commit is contained in:
parent
171d7d3a29
commit
4af20a3cb5
16
contrib/word_filter/test.php
Normal file
16
contrib/word_filter/test.php
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
class WordFilterUnitTest extends UnitTestCase {
|
||||||
|
public function testURL() {
|
||||||
|
$this->assertEqual(
|
||||||
|
$this->filter("whore"),
|
||||||
|
"nice lady");
|
||||||
|
}
|
||||||
|
|
||||||
|
private function filter($in) {
|
||||||
|
$bb = new WordFilter();
|
||||||
|
$tfe = new TextFormattingEvent($in);
|
||||||
|
$bb->receive_event($tfe);
|
||||||
|
return $tfe->formatted;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
Loading…
x
Reference in New Issue
Block a user