Moved Google Profanity API to it's own repo

It can be found at https://github.com/joshtronic/php-googleprofanity
This commit is contained in:
Josh Sherman 2014-09-23 22:19:45 -04:00
parent 67be4e0889
commit 5f2eaead10
2 changed files with 0 additions and 89 deletions

View file

@ -1,41 +0,0 @@
<?php
class API_Google_ProfanityTest extends PHPUnit_Framework_TestCase
{
/**
* @dataProvider providerFormatPhoneNumber
*/
public function testCheck($a, $b)
{
$this->assertEquals($b, API_Google_Profanity::check($a));
}
public function providerFormatPhoneNumber()
{
return [
['alpha', false],
['beta', false],
['joshtronic', false],
['god', false],
['fck', false],
['fuck', true],
['shit', true],
['cocksucker', true],
['cuntface', false], // Unsure why not...
];
}
/**
* @expectedException Exception
* @expectedExceptionMessage Invalid response from API.
*/
public function testInvalidResponse()
{
$file = SITE_PATH . 'null-';
file_put_contents($file . 'test', null);
API_Google_Profanity::check('test', $file);
}
}