commit
c3c208a805
|
|
@ -113,6 +113,7 @@ Pull requests are welcome, but please make sure you provide unit tests to cover
|
||||||
- English
|
- English
|
||||||
- Spanish
|
- Spanish
|
||||||
- Italian ( provided by @aletundo )
|
- Italian ( provided by @aletundo )
|
||||||
|
- Traditional Chinese ( provided by @Nationalcat )
|
||||||
|
|
||||||
## License
|
## License
|
||||||
This project is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).
|
This project is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'幹',
|
||||||
|
'肏',
|
||||||
|
'雞掰',
|
||||||
|
'幹你娘',
|
||||||
|
'幹您娘',
|
||||||
|
'奈米屌',
|
||||||
|
'短屌',
|
||||||
|
'細軟腸',
|
||||||
|
'死肥子',
|
||||||
|
'死胖子',
|
||||||
|
'幹你老師',
|
||||||
|
'幹您老師',
|
||||||
|
'操你妹',
|
||||||
|
'耖你妹',
|
||||||
|
'肏你妹',
|
||||||
|
'崩崩',
|
||||||
|
'操機歪',
|
||||||
|
'娘被狗幹',
|
||||||
|
'耖機文',
|
||||||
|
'肏機歪',
|
||||||
|
'破麻',
|
||||||
|
'腦殘',
|
||||||
|
'王八蛋',
|
||||||
|
'白痴',
|
||||||
|
'畜生',
|
||||||
|
'色龜',
|
||||||
|
'龜公',
|
||||||
|
'智缺',
|
||||||
|
'沒屁眼',
|
||||||
|
'黑鮑',
|
||||||
|
'變形莖肛',
|
||||||
|
'LP',
|
||||||
|
'黑鬼',
|
||||||
|
'尼哥',
|
||||||
|
'懶趴',
|
||||||
|
'懶叫',
|
||||||
|
'打手槍',
|
||||||
|
'淫穴',
|
||||||
|
'討客兄',
|
||||||
|
'淫蟲',
|
||||||
|
'腦殘',
|
||||||
|
'智缺',
|
||||||
|
'智障',
|
||||||
|
'手殘',
|
||||||
|
'腳殘',
|
||||||
|
'嘴賤',
|
||||||
|
'綠吱',
|
||||||
|
'藍蛆',
|
||||||
|
'大龜頭',
|
||||||
|
'小雞雞',
|
||||||
|
'大奶頭',
|
||||||
|
'女乃豆頁',
|
||||||
|
'奶豆頁',
|
||||||
|
'女乃頭',
|
||||||
|
'GGininder',
|
||||||
|
'駱駝蹄',
|
||||||
|
'婊子',
|
||||||
|
'淫蕩',
|
||||||
|
'蕩婦',
|
||||||
|
'早洩',
|
||||||
|
'快槍俠',
|
||||||
|
'黑B',
|
||||||
|
'黑穴',
|
||||||
|
'黑逼',
|
||||||
|
'賣淫',
|
||||||
|
'口爆',
|
||||||
|
'中出',
|
||||||
|
'啪啪啪',
|
||||||
|
'口交',
|
||||||
|
'足交',
|
||||||
|
'乳交',
|
||||||
|
'雜交',
|
||||||
|
'獸交',
|
||||||
|
'多P',
|
||||||
|
'漱懶',
|
||||||
|
'騷逼',
|
||||||
|
'抽插',
|
||||||
|
'打砲',
|
||||||
|
'內射',
|
||||||
|
'顏射',
|
||||||
|
'肛交',
|
||||||
|
'潮吹',
|
||||||
|
'軟屌'
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'profane' => ':attribute欄位內容包含粗俗用詞,請您修正:)'
|
||||||
|
];
|
||||||
|
|
@ -28,8 +28,8 @@ class ProfaneValidatorTest extends PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
$this->mockConfigs();
|
$this->mockConfigs();
|
||||||
$attribute = 'description';
|
$attribute = 'description';
|
||||||
$text = 'fck you bitch';
|
$text = 'fck you bitch. 幹!';
|
||||||
$parameters = ['es', 'en'];
|
$parameters = ['es', 'en' , 'zh-tw'];
|
||||||
|
|
||||||
$profane = new ProfaneValidator();
|
$profane = new ProfaneValidator();
|
||||||
|
|
||||||
|
|
@ -117,9 +117,9 @@ class ProfaneValidatorTest extends PHPUnit_Framework_TestCase
|
||||||
$this->mockConfigs();
|
$this->mockConfigs();
|
||||||
|
|
||||||
$profane = new ProfaneValidator();
|
$profane = new ProfaneValidator();
|
||||||
$profane->setDictionary(['es', 'en']);
|
$profane->setDictionary(['es', 'en', 'it', 'zh-tw']);
|
||||||
|
|
||||||
$expected = array_merge(include __DIR__.'/../src/dict/es.php', include __DIR__.'/../src/dict/en.php');
|
$expected = array_merge(include __DIR__.'/../src/dict/es.php', include __DIR__.'/../src/dict/en.php', include __DIR__.'/../src/dict/it.php', include __DIR__.'/../src/dict/zh-tw.php');
|
||||||
|
|
||||||
$this->assertEquals($profane->getBadwords(), $expected);
|
$this->assertEquals($profane->getBadwords(), $expected);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue