public function testShouldZlibCompressionWhenAvailable()
 {
     $params = $this->params;
     $params['enableZlib'] = true;
     $sa = new SpamAssassin_Client($params);
     $result = $sa->process($this->gtube);
     $this->assertTrue($result->isSpam);
 }
Esempio n. 2
0
 public function testShouldAlsoWorkWithProtocol12()
 {
     $this->params["protocolVersion"] = 1.2;
     $sa = new SpamAssassin_Client($this->params);
     $message = $this->getMessage('HeadersTest_Ham.txt');
     $headers = $sa->headers($message);
     $this->assertContains("X-Spam-Status: No", $headers);
 }
Esempio n. 3
0
 public function testShouldThrowExceptionIfMessageExceedsMaxSize()
 {
     $this->expectedException = 'SpamAssassin_Client_Exception';
     $params = $this->params;
     // setting max size as 10 bytes less than message size
     $params['maxSize'] = strlen($this->gtube) - 10;
     $sa = new SpamAssassin_Client($params);
     $result = $sa->process($this->gtube);
 }