コード例 #1
0
ファイル: mollom.Test.php プロジェクト: nathansamson/CoOrg
	public function testCheckContentOutDatedServerList()
	{
		CoOrg::config()->set('mollom/serverlist', array('outdated'));
		
		$mollomMessage = new MollomMessage;
		$mollomMessage->authorEmail = '*****@*****.**';
		$mollomMessage->body = 'SPAM BODY';
		$this->assertEquals(PropertySpamStatus::SPAM, $mollomMessage->check());
		
		$this->assertTrue(Session::has('mollom/sessionid'));
		Session::delete('mollom/sessionid');
		Mollom::clear();
		CoOrg::config()->set('mollom/serverlist', array('outdated'));
		
		$mollomMessage = new MollomMessage;
		$mollomMessage->authorEmail = '*****@*****.**';
		$mollomMessage->body = 'GOOD BODY';
		$this->assertEquals(PropertySpamStatus::OK, $mollomMessage->check());
		$this->assertTrue(Session::has('mollom/sessionid'));
	}