コード例 #1
0
 public function testShouldZlibCompressionWhenAvailable()
 {
     $params = $this->params;
     $params['enableZlib'] = true;
     $sa = new Client($params);
     $result = $sa->process($this->gtube);
     $this->assertTrue($result->isSpam);
 }
コード例 #2
0
 public function testShouldAlsoWorkWithProtocol12()
 {
     $this->params["protocolVersion"] = 1.2;
     $sa = new Client($this->params);
     $message = $this->getMessage('HeadersTest_Ham.txt');
     $headers = $sa->headers($message);
     $this->assertContains("X-Spam-Status: No", $headers);
 }
コード例 #3
0
 public function testShouldThrowExceptionIfMessageExceedsMaxSize()
 {
     $this->setExpectedException('Spamassassin\\Client\\Exception');
     $params = $this->params;
     // setting max size as 10 bytes less than message size
     $params['maxSize'] = strlen($this->gtube) - 10;
     $sa = new Client($params);
     $result = $sa->process($this->gtube);
 }