Source for file Services_Trackback_SpamCheck_DNSBL_Test.php
Documentation is available at Services_Trackback_SpamCheck_DNSBL_Test.php
// Services_Trackback classes
require_once 'Services/Trackback.php';
require_once 'Services/Trackback/SpamCheck.php';
require_once 'Services/Trackback/SpamCheck/DNSBL.php';
require_once dirname (__FILE__ ). '/trackback_data.php';
class Services_Trackback_SpamCheck_DNSBL_Test extends PHPUnit_Framework_TestCase
var $trackbacks = array ();
foreach ($trackbackData as $id => $set) {
$this->assertTrue ($this->spamCheck == $realCheck);
function test_check_failure_nospam () {
$this->assertTrue (!$this->spamCheck->check ($this->trackbacks['nospam']));
function test_check_failure_undetected () {
$this->assertTrue (!$this->spamCheck->check ($this->trackbacks['undetected']));
function test_check_success_all () {
$this->assertTrue ($this->spamCheck->check ($this->trackbacks['all']));
function test_check_success_host () {
$this->assertTrue ($this->spamCheck->check ($this->trackbacks['host']));
function test_check_failure_title () {
$this->assertTrue (!$this->spamCheck->check ($this->trackbacks['title']));
function test_check_failure_excerpt () {
$this->assertTrue (!$this->spamCheck->check ($this->trackbacks['excerpt']));
function test_check_failure_url () {
$this->assertTrue (!$this->spamCheck->check ($this->trackbacks['url']));
function test_check_failure_blog_name () {
$this->assertTrue (!$this->spamCheck->check ($this->trackbacks['blog_name']));
function test_getResults () {
$this->spamCheck->check ($this->trackbacks['all']);
$results = $this->spamCheck->getResults ();
$this->assertTrue ($results[0 ]);
$this->spamCheck->check ($this->trackbacks['all']);
$this->spamCheck->reset ();
$fakeCheck->_dnsbl ->blacklists = array ('bl.spamcop.net');
$this->assertTrue ($this->spamCheck == $fakeCheck);
Documentation generated on Mon, 11 Mar 2019 15:25:47 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|