public function testShouldZlibCompressionWhenAvailable() { $params = $this->params; $params['enableZlib'] = true; $sa = new Client($params); $result = $sa->process($this->gtube); $this->assertTrue($result->isSpam); }
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); }
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); }