basic word filter test
This commit is contained in:
parent
171d7d3a29
commit
4af20a3cb5
1 changed files with 16 additions and 0 deletions
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;
|
||||
}
|
||||
}
|
||||
?>
|
Reference in a new issue