Source for file Services_Trackback_SpamCheck_Test.php
Documentation is available at Services_Trackback_SpamCheck_Test.php
// Includepath for local CVS development
// set_include_path('/cvs/pear/Services_Trackback'.PATH_SEPARATOR.get_include_path());
// Services_Trackback classes
require_once 'Services/Trackback.php';
require_once 'Services/Trackback/SpamCheck.php';
require_once 'Services/Trackback/SpamCheck/Wordlist.php';
require_once 'PHPUnit.php';
require_once dirname (__FILE__ ). '/trackback_data.php';
class Webservices_Trackback_SpamCheck_TestCase extends PHPUnit_TestCase
var $trackbacks = array ();
// {{{ Webservices_Trackback_SpamCheck_TestCase()
// constructor of the test suite
function Webservices_Trackback_TestCase ($name) {
$this->PHPUnit_TestCase ($name);
$this->assertTrue ($this->spamCheck == $realCheck);
function test_check_success () {
$this->assertTrue ($this->spamCheck->check ($this->_trackbacks['spam']));
function test_check_failure () {
$this->assertTrue (!$this->spamCheck->check ($this->_trackbacks['nospam']));
function test_getResults () {
$this->spamCheck->check ($this->_trackbacks['spam']);
$results = $this->spamCheck->getResults ();
$this->assertTrue ($results[6 ]);
$this->spamCheck->check ($this->_trackbacks['spam']);
$this->spamCheck->_results = array ();
$this->assertTrue ($this->spamCheck == $fakeCheck);
$suite = new PHPUnit_TestSuite ("Webservices_Trackback_SpamCheck_TestCase");
$result = PHPUnit ::run ($suite);
echo $result->toString ();
Documentation generated on Mon, 11 Mar 2019 14:36:31 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|